Sample HTML using angular directives.
Change-Id: I94d7d9fadf9086003646446fedd61a318b689dcb
diff --git a/web/gui/src/main/webapp/_sdh/ng-examples/ch02-04-controller-click-msg.html b/web/gui/src/main/webapp/_sdh/ng-examples/ch02-04-controller-click-msg.html
new file mode 100644
index 0000000..4a4a22e
--- /dev/null
+++ b/web/gui/src/main/webapp/_sdh/ng-examples/ch02-04-controller-click-msg.html
@@ -0,0 +1,26 @@
+<!DOCTYPE html>
+<html ng-app="notesApp">
+<head>
+ <title>Notes App</title>
+ <script src="../../tp/angular.js"></script>
+</head>
+<body ng-controller="MainCtrl as ctrl">
+ {{ctrl.message}} AngularJS.
+
+ <button ng-click="ctrl.changeMessage()">
+ Change Message
+ </button>
+
+ <script type="text/javascript">
+ angular.module('notesApp', [])
+ .controller('MainCtrl', [function () {
+ var self = this;
+ self.message = 'Hello';
+ self.changeMessage = function () {
+ self.message = 'Goodbye'
+ };
+ }]);
+ </script>
+
+</body>
+</html>