Skip to content

Instantly share code, notes, and snippets.

@BlakeMesdag
Created June 16, 2013 02:38
Show Gist options
  • Save BlakeMesdag/5790537 to your computer and use it in GitHub Desktop.
Save BlakeMesdag/5790537 to your computer and use it in GitHub Desktop.
BaconTracker index template
<h2>Our Bacon</h2>
<table>
<thead>
<th>Name</th>
<th>Quantity</th>
</thead>
<tbody>
<tr data-foreach-bacon="bacons">
<td data-bind="bacon.name"></td>
<td data-bind="bacon.quantity"></td>
</tr>
</tbody>
</table>
<h2>Add some Bacon</h2>
<table>
<tbody>
<tr>
<td>Name <input type="text" data-bind="newBacon.name" /></td>
<td>Quantity <input type="number" data-bind="newBacon.quantity" /></td>
</tr>
</tbody>
</table>
<a href="#" data-event-click="createBacon | withArguments newBacon">Add Bacon</a>
@BlakeMesdag
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment