This repository was archived by the owner on Mar 12, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
72 lines (62 loc) · 1.84 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<html>
<head>
<style type="text/css">
div.left,
div.right {
position: relative;
float: left;
}
.wrapper {
width: 100%;
}
.left {
width: 40%;
}
.right {
width: 40%;
}
.log {
margin-top: 10px;
}
ul {
list-style-type: none;
}
</style>
</head>
<body>
<div ng-app="myModule" class="wrapper">
<h2>AngularJS Initialization Demo</h2>
<div ng-controller="simpleController" class="left">
<h3>basic example</h3>
<p ng-show="options.length == 0">loading options...</p>
<select ng-show="options.length !== 0"
ng-model="selectedOption"
ng-options="option.value as option.name for option in options">
</select>
<div class="log">
log:
<ul>
<li ng-repeat="entry in logentries">{{entry}}</li>
</ul>
</div>
</div>
<div ng-controller="controllerWithInitialization" class="right">
<h3>initialization aware</h3>
<p ng-show="options.length == 0">loading options...</p>
<select ng-show="options.length !== 0"
ng-model="selectedOption"
ng-options="option.value as option.name for option in options">
</select>
<div class="log">
log:
<ul>
<li ng-repeat="entry in logentries">{{entry}}</li>
</ul>
</div>
</div>
</div>
<script src="//cdnjs.cloudflare.com/ajax/libs/underscore.js/1.5.2/underscore-min.js" type="text/javascript"></script>
<script src="//cdnjs.cloudflare.com/ajax/libs/angular.js/1.1.5/angular.min.js" type="text/javascript"></script>
<script src="app.js" type="text/javascript"></script>
</body>
</html>