blob: 06a4fa722962fbd1427770768ffb3fd75c997b7f [file] [log] [blame]
Simon Hunt335b2472014-12-08 16:52:18 -08001<!DOCTYPE html>
2<html ng-app="notesApp">
3<head>
4 <title>Notes App</title>
5 <script src="../../tp/angular.js"></script>
6 <style>
7 span {
8 background-color: #cce;
9 }
10 </style>
11</head>
12<body ng-controller="MainCtrl as ctrl">
13
14 <table>
15 <tr ng-repeat-start="note in ctrl.notes">
16 <td>{{note.label}}</td>
17 </tr>
18 <tr ng-repeat-end>
19 <td>Done: {{note.done}}</td>
20 </tr>
21 </table>
22
23
24 <script type="text/javascript">
25 angular.module('notesApp', []).controller('MainCtrl', [
26 function () {
27 var self = this;
28 self.notes = [
29 {id: 1, label: 'First note', done: false},
30 {id: 2, label: 'Second note', done: false},
31 {id: 3, label: 'Finished third note', done: true}
32 ];
33 }
34 ]);
35 </script>
36
37</body>
38</html>