diff options
Diffstat (limited to 'framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch05-02-log-example.html')
-rw-r--r-- | framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch05-02-log-example.html | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch05-02-log-example.html b/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch05-02-log-example.html new file mode 100644 index 00000000..d516440d --- /dev/null +++ b/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch05-02-log-example.html @@ -0,0 +1,22 @@ +<!DOCTYPE html> +<html ng-app="notesApp"> +<head> + <title>Notes App</title> + <script src="../../tp/angular.js"></script> +</head> +<body ng-controller="MainCtrl as mainCtrl"> + + <h1> Hello Services! </h1> + <button ng-click="mainCtrl.logStuff()">Log something</button> + + <script type="text/javascript"> + angular.module('notesApp', []) + .controller('MainCtrl', ['$log', function ($log) { + var self = this; + self.logStuff = function () { + $log.log('The button was pressed'); + }; + }]); + </script> +</body> +</html> |