-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
28 lines (28 loc) · 835 Bytes
/
index.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
<!doctype html>
<html ng-app>
<head>
<script src="https://ajax.googleapis.com/ajax/libs
/angularjs/1.2.0-rc.2/angular.js"></script>
</script>
</head>
<body>
<div ng-controller="MyController">
<h1>Hello {{ name }}!</h1>
</div>
<script type="text/javascript">
function MyController($scope) {
$scope.name = "Ved";
var updateName = function() {
if($scope.name=="Ved")
$scope.name = "Manasvi";
else
$scope.name = "Ved";
};
setInterval(function() {
$scope.$apply(updateName);
}, 1000);
updateName();
};
</script>
</body>
</html>