Simon Hunt | 449630f | 2014-12-09 11:40:00 -0800 | [diff] [blame] | 1 | // Simple controller |
2 | |||||
3 | angular.module('notesApp', []) | ||||
4 | .controller('ListCtrl', [function () { | ||||
5 | var self = this; | ||||
6 | self.items = [ | ||||
7 | {id: 1, label: 'First', done: true}, | ||||
8 | {id: 2, label: 'Second', done: false} | ||||
9 | ]; | ||||
10 | |||||
11 | self.getDoneClass = function (item) { | ||||
12 | return { | ||||
13 | finished: item.done, | ||||
14 | unfinished: !item.done | ||||
15 | }; | ||||
16 | }; | ||||
17 | }]); |