Skip to content

Instantly share code, notes, and snippets.

@beyond-code-github
Created June 9, 2013 08:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beyond-code-github/17cb512c4730e478c5fc to your computer and use it in GitHub Desktop.
Save beyond-code-github/17cb512c4730e478c5fc to your computer and use it in GitHub Desktop.
Knockout bound table after modifications from Part 2
<table>
<thead>
<tr data-bind="foreach: headings">
<th data-bind="text: $data"></th>
</tr>
</thead>
<tbody data-bind="foreach: { data: records, as: 'record' }">
<tr data-bind="foreach: { data: $root.headings, as: 'field' }">
<td data-bind="text: record[field]"></td>
</tr>
</tbody>
</table>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment