-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
37 lines (36 loc) · 1.22 KB
/
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
29
30
31
32
33
34
35
36
37
<!doctype html>
<html>
<head>
<title>Angular Introduction</title>
<style type="text/css">
.ng-cloak {
display: none;
}
label {
width: 100px;
display: inline-block;
}
</style>
</head>
<body ng-app>
<div class="ng-cloak" ng-controller="SimpleController">
<h1>Dynamic Views</h1>
<label>Noun</label><input ng-model="noun"><br>
<label>Verb</label><input ng-model="verb"><br>
<label>Adjective</label><input ng-model="adjective"><br>
<label>Adverb</label><input ng-model="adverb"><br>
<p ng-show="allTheThings()">
The {{ adjective }} {{ noun }} {{ verb }} {{ adverb }} to the other side of the hill.
</p>
</div>
<script type="text/javascript" src="js/angular.min.js"></script>
<script type="text/javascript">
'use strict';
function SimpleController($scope) {
$scope.allTheThings = function() {
return $scope.adjective && $scope.noun && $scope.verb && $scope.adverb;
};
}
</script>
</body>
</html>