Created
June 16, 2013 02:38
-
-
Save BlakeMesdag/5790537 to your computer and use it in GitHub Desktop.
BaconTracker index template
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Original code for this guide: BaconTracker – Getting Started with Batman.js and Rails 4