forked from im4aLL/Angular-tutorial
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path16.things_extras.html
More file actions
40 lines (28 loc) · 908 Bytes
/
16.things_extras.html
File metadata and controls
40 lines (28 loc) · 908 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Tips and tricks</title>
<link rel="stylesheet" href="src/doc.css">
</head>
<body>
<div ng-app="myApp">
<div ng-controller="sampleController">
<strong>Normal binding</strong> <input type="text" ng-model="text" class="form-control"> {{text}}
<strong>Single binding</strong> <input type="text" ng-model="text2" class="form-control"> {{::text2}}
<hr>
update on blur: <input type="text" ng-model="sampleText" ng-model-options="{ updateOn: 'blur' }">
Text: {{sampleText}}
<hr>
debounce/ delay :<input type="text" ng-model="username" ng-model-options="{ debounce: 250 }" />
username: {{username}}
</div>
</div>
<script src="src/angular.1.3.min.js"></script>
<script>
var myApp = angular.module('myApp', []);
myApp.controller('sampleController', ['$scope', function($scope) {
}]);
</script>
</body>
</html>