Simon Hunt | 335b247 | 2014-12-08 16:52:18 -0800 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <html ng-app="notesApp"> |
| 3 | <head> |
| 4 | <title>Notes App</title> |
| 5 | <script src="../../tp/angular.js"></script> |
| 6 | </head> |
| 7 | <body ng-controller="MainCtrl as ctrl"> |
| 8 | |
| 9 | <div ng-repeat="note in ctrl.notes"> |
| 10 | <span class="label"> {{note.label}} </span> |
| 11 | <!--<span class="status" ng-bind="note.done"></span>--> |
| 12 | <span class="status"> {{note.done}} </span> |
| 13 | </div> |
| 14 | |
| 15 | <script type="text/javascript"> |
| 16 | angular.module('notesApp', []) |
| 17 | .controller('MainCtrl', [function () { |
| 18 | var self = this; |
| 19 | self.notes = [ |
| 20 | {id: 1, label: 'First note', done: false}, |
| 21 | {id: 2, label: 'Second note', done: false}, |
| 22 | {id: 3, label: 'Done note', done: true}, |
| 23 | {id: 4, label: 'Last note', done: false} |
| 24 | ] |
| 25 | }]); |
| 26 | </script> |
| 27 | |
| 28 | </body> |
| 29 | </html> |