-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathbinding.html
55 lines (40 loc) · 1.34 KB
/
binding.html
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<!DOCTYPE html>
<html lang="en" ng-app="MyApp">
<head>
<meta charset="utf-8">
<title>Simple databinding</title>
<!-- Bootstrap core CSS -->
<link href="assets/css/bootstrap.min.css" rel="stylesheet">
<!-- Custom CSS -->
<link href="assets/css/portfolio-item.css" rel="stylesheet">
<script src="assets/js/angular/angular.js"></script>
<script src="./app/binding.js"></script>
<script src="./app/bindingcontroller.js" type="text/javascript"></script>
<script>
function update() {
var elemInput = document.getElementById('input');
var elemTag = document.getElementById('tag');
elemTag.value = elemInput.value;
}
</script>
</head>
<body>
<textarea id='tag'>Default</textarea>
<br/>
<input id='input'/>
<button onclick='update()'>Update</button>
<p>
Nothing here {{'yet' + '!'}} {{ 1 + 12}}
</p>
<div ng-controller='Simple'>
<p>{{greeting.foo}}, World</p>
<input ng-model='greeting.foo'>
<p>{{greeting.all}}, everyone</p>
<input type="checkbox" ng-model='greeting.checked'>Checked</input>
<input ng-model='greeting.checked'>Checked</input>
</div>
<script type="text/javascript">
console.log("angular object",angular);
</script>
</body>
</html>