aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch02-02-creating-controller.html
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch02-02-creating-controller.html')
-rw-r--r--framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch02-02-creating-controller.html20
1 files changed, 20 insertions, 0 deletions
diff --git a/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch02-02-creating-controller.html b/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch02-02-creating-controller.html
new file mode 100644
index 00000000..566c6dd5
--- /dev/null
+++ b/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch02-02-creating-controller.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<html ng-app="notesApp">
+<head>
+ <title>Hello AngularJS</title>
+
+ <script src="../../tp/angular.js"></script>
+</head>
+<body ng-controller="MainCtrl">
+ Hello {{1 + 1}}nd time AngularJS
+
+ <script type="text/javascript">
+ angular.module('notesApp', [])
+ .controller('MainCtrl', [function () {
+ // controller specific code here
+ console.log('MainCtrl has been created');
+ }]);
+ </script>
+
+</body>
+</html>