aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch05-01-need-for-service.html
diff options
context:
space:
mode:
Diffstat (limited to 'framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch05-01-need-for-service.html')
-rw-r--r--framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch05-01-need-for-service.html41
1 files changed, 41 insertions, 0 deletions
diff --git a/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch05-01-need-for-service.html b/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch05-01-need-for-service.html
new file mode 100644
index 00000000..21d17e4c
--- /dev/null
+++ b/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch05-01-need-for-service.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<html ng-app="notesApp">
+<head>
+ <title>Notes App</title>
+ <script src="../../tp/angular.js"></script>
+ <script src="ch05-01-need-for-service-app.js"></script>
+</head>
+<body ng-controller="MainCtrl as mainCtrl">
+
+ <h1> Hello Controllers! </h1>
+ <button ng-click="mainCtrl.open('first')">Open First</button>
+ <button ng-click="mainCtrl.open('second')">Open Second</button>
+
+ <div ng-switch on="mainCtrl.tab">
+
+ <div ng-switch-when="first">
+ <div ng-controller="SubCtrl as ctrl">
+ <h3>First Tab</h3>
+ <button ng-click="ctrl.add()">Add more items</button>
+ <ul>
+ <li ng-repeat="item in ctrl.list">
+ <span ng-bind="item.label"></span>
+ </li>
+ </ul>
+ </div>
+ </div>
+
+ <div ng-switch-when="second">
+ <div ng-controller="SubCtrl as ctrl">
+ <h3>Second Tab</h3>
+ <button ng-click="ctrl.add()">Add more items</button>
+ <ul>
+ <li ng-repeat="item in ctrl.list">
+ <span ng-bind="item.label"></span>
+ </li>
+ </ul>
+ </div>
+ </div>
+ </div>
+</body>
+</html>