-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
41 lines (39 loc) · 1.27 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
<html ng-app="TissuesApp">
<head>
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.0.6/angular.min.js"></script>
<script src="vendor/assets/javascripts/angular-resource.js"></script>
<script src="app/assets/javascripts/angular_tissues.js"></script>
</head>
<body>
<div ng-init="friends = [{name:'John', age:25}, {name:'Mary', age:28}]">
I have {{friends.length}} friends. They are:
<ul>
<li ng-repeat="friend in friends">
[{{$index + 1}}] {{friend.name}} who is {{friend.age}} years old.
</li>
</ul>
</div>
<h1>Tissue#index</h1>
<p>Find me in app/views/tissue/index.html.erb</p>
<div ng-controller="TissuesCtrl">
<h2>{{heading}}</h2>
<input type="text" ng_model="thing1"></input>
<p>{{thing1}}</p>
<input type="checkbox" ng-model="thing"></input>
<p>{{thing}}</p>
<li ng-repeat="tissue in tissues">{{tissue.name}}</li>
<p>{{tissues}}</p>
<ul>
<li ng-repeat="todo in todos">
<input type="checkbox" ng-model="todo.done">
<span class="done-{{todo.done}}">{{todo.text}}</span>
</li>
</ul>
</div>
<div ng-init="stuffs=[{name: 'stuff1'}, {name: 'stuff2'}]">
<ul>
<li ng-repeat="stuff in stuffs">{{stuff.name}}</li>
</ul>
</div>
</body>
</html>