-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathstep-6.html
59 lines (57 loc) · 1.63 KB
/
step-6.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Step 6: ng-repeat</title>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/app.css">
<script src="lib/angular/angular.js"></script>
<script src="js/step6.js"></script>
</head>
<body ng-app ng-controller="MyCtrl">
<div class="container">
<h1>Step 6: ng-repeat</h1>
<div class="row">
<span class="pull-left"><a href="step-5.html"><< Step 5: ng-click</a></span>
<span class="pull-right"><a href="step-7.html">Step 7: $digest() >></a></span>
</div>
<hr>
<h1>Uma tabelinha:</h1>
<div ng-show="selected_phone" class="row">
<div class="span6">
<img ng-src="{{selected_phone.imageUrl}}" class="bordinha">
</div>
<div class="span6">
<div>
<div>
id: {{ selected_phone.id }}
</div>
<div>
age: {{ selected_phone.age }}
</div>
<div>
Modelo: {{ selected_phone.name }}
</div>
<div>
Descrição: {{ selected_phone.snippet }}
</div>
</div>
</div>
</div>
<div>
<table class="table">
<tr>
<th></th>
<th>Modelo</th>
<th>Descrição</th>
</tr>
<tr ng-repeat="phone in phones" ng-click="select(phone)" ng-class="{selected: phone.is_selected}">
<td><img ng-src="{{phone.imageUrl}}" class="thumb40"></td>
<td>{{phone.name}}</td>
<td>{{phone.snippet}}</td>
</tr>
</table>
</div>
</div>
</body>
</html>