aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/js/ch03-controller.js
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/js/ch03-controller.js')
-rw-r--r--framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/js/ch03-controller.js17
1 files changed, 17 insertions, 0 deletions
diff --git a/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/js/ch03-controller.js b/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/js/ch03-controller.js
new file mode 100644
index 00000000..92d3b0c0
--- /dev/null
+++ b/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/js/ch03-controller.js
@@ -0,0 +1,17 @@
+// Simple controller
+
+angular.module('notesApp', [])
+ .controller('ListCtrl', [function () {
+ var self = this;
+ self.items = [
+ {id: 1, label: 'First', done: true},
+ {id: 2, label: 'Second', done: false}
+ ];
+
+ self.getDoneClass = function (item) {
+ return {
+ finished: item.done,
+ unfinished: !item.done
+ };
+ };
+ }]);