diff options
Diffstat (limited to 'framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch04-01-simple-ng-model.html')
-rw-r--r-- | framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch04-01-simple-ng-model.html | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch04-01-simple-ng-model.html b/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch04-01-simple-ng-model.html new file mode 100644 index 00000000..5c8a4b13 --- /dev/null +++ b/framework/src/onos/web/gui/src/main/webapp/_sdh/ng-examples/ch04-01-simple-ng-model.html @@ -0,0 +1,28 @@ +<!DOCTYPE html> +<html ng-app="notesApp"> +<head> + <title>Notes App</title> + <script src="../../tp/angular.js"></script> + <style> + span { + background-color: #cce; + } + </style> +</head> +<body ng-controller="MainCtrl as ctrl"> + +<input type="text" ng-model="ctrl.username"/> +You typed {{ctrl.username}} + + +<script type="text/javascript"> + angular.module('notesApp', []).controller('MainCtrl', [ + function () { + var self = this; + self.username = 'nothing'; + } + ]); +</script> + +</body> +</html> |