-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdatabind.html
More file actions
38 lines (31 loc) · 781 Bytes
/
databind.html
File metadata and controls
38 lines (31 loc) · 781 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
<html ng-app="myapp">
<head>
<script src="../angular.min.js"></script>
<script>
var myapp = angular.module("myapp", []);
myapp.controller("mycontroller", function($scope){
$scope.greetings = [{name: "test"}];
});
</script>
</head>
<body>
<div>
<input type="text" ng-model="name">{{name}}</input>
</div>
<br ></br>
<div ng-controller="mycontroller">
<input type="text" ng-model="name1">
<p ng-repeat="data in greetings | filter:name1">{{data.name}}</p>
</div>
<br ></br>
<div ng-show="showdetails">
<div> Hello World
</div>
</div>
<button ng-click="showdetails = ! showdetails"> Show / Hide </button>
<br ></br>
<p>count {{count}}</p>
<button ng-click="count = count + 1" ng-init="count=0"> Increment </button>
<br ></br>
</body>
</html>