Skip to content

Instantly share code, notes, and snippets.

@andrewhl
Last active August 29, 2015 14:06
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 andrewhl/c067ed9125afee8c98f9 to your computer and use it in GitHub Desktop.
Save andrewhl/c067ed9125afee8c98f9 to your computer and use it in GitHub Desktop.
<div class="angular-container" ng-controller="foodItemsCtrl">
<table class="table table-striped">
<tr>
<th>Name</th>
<th>Description</th>
<th>Starts At</th>
<th>Ends At</th>
<th>Price</th>
<th>Cooking Instructions</th>
<th>Nutritional Information</th>
<th>Assembly Instructions</th>
<th>Active</th>
<th>Size Type</th>
<th>Archive</th>
<th>Delete</th>
</tr>
<tr ng-repeat="foodItemTemplate in foodItemTemplates">
<td>{{ foodItemTemplate.name }}</td>
<td>{{ foodItemTemplate.description }}</td>
<td>{{ foodItemTemplate.starts_at }}</td>
<td>{{ foodItemTemplate.ends_at }}</td>
<td>${{ foodItemTemplate.price }}</td>
<td>{{ foodItemTemplate.cooking_instructions }}</td>
<td>{{ foodItemTemplate.nutritional_information }}</td>
<td>{{ foodItemTemplate.assembly_instructions }}</td>
<td>{{ foodItemTemplate.active }}</td>
<td>{{ foodItemTemplate.size_type }}</td>
<td>{{ foodItemTemplate.archive }}</td>
<td>
<button class="btn btn-danger" ng-click="deleteFoodItemTemplate(foodItemTemplate.id)">Delete</button>
</td>
<td>
<div ng-controller="ModalCtrl">
<script type="text/ng-template" id="myModalContent.html">
<div class="modal-header">
<h3 class="modal-title">I'm a modal!</h3>
</div>
<div class="modal-body">
<ul>
<li>
{{ foodItemTemplate }}
</li>
</ul>
</div>
<div class="modal-footer">
<button class="btn btn-primary" ng-click="ok()">OK</button>
<button class="btn btn-warning" ng-click="cancel()">Cancel</button>
</div>
</script>
<button class="btn btn-default" ng-click="open()">Delete</button>
</div>
</td>
</tr>
</table>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment