Adding AngularJS view templates
With this, the JavaScript code for our AngularJS app is in place, but we aren't done yet. We also need four HTML views for the app: The main view with the editor, plus three custom grid cell templates, one for the operations column that holds the Save
and Delete
controls, one for the Category
column cells (because there we need to translate from category IDs to category names), and one for the Category
cells in edit mode, because when we edit the category of a keyword, we don't want to edit its name as a string, but rather choose from a list of existing categories through a dropdown control.
We start with src/frontend/app/keywords/partials/editor.html
:
< div class="span12" > <form> <input class="input-medium" ng-model="newKeyword.value" ng-init="newKeyword.value = ''" type="text" placeholder="Name of new keyword" > <select ng-model="newKeyword.categoryID" ng-init="newKeyword.categoryID...