-
Notifications
You must be signed in to change notification settings - Fork 28
/
Copy pathstep-9.html
67 lines (65 loc) · 2.1 KB
/
step-9.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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Step 9: Serviços customizados</title>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/app.css">
<script src="lib/angular/angular.js"></script>
<script src="lib/jquery.js"></script>
<script src="js/step9.js"></script>
</head>
<body ng-app="home" ng-controller="MyCtrl">
<div class="container">
<h1>Step 9: Serviços customizados</h1>
<div class="row">
<span class="pull-left"><a href="step-8.html"><< Step 8: AJAX com JQuery</a></span>
<span class="pull-right"><a href="step-10.html">Step 10: Mockando AJAX >></a></span>
</div>
<hr>
<h1>O Angular injeta serviços!</h1>
<img src="img/loader.gif" ng-show="loading">
<div ng-show="selected_phone && !loading" class="row">
<div class="span6">
<img ng-src="{{selected_phone.selected_image}}" class="bordinha">
<div class="row">
<img ng-repeat="image in selected_phone.images" ng-src="{{image}}" class="thumb40" ng-click="select_image(image)">
</div>
</div>
<div class="span6">
<div>
<div>
id: {{ selected_phone.id }}
</div>
<div>
Dimensions: {{ selected_phone.sizeAndWeight.dimensions }}
</div>
<div>
Flash: {{ selected_phone.storage.flash }}
</div>
<div>
CPU: {{ selected_phone.hardware.cpu }}
</div>
<div>
Additional Features: {{ selected_phone.additionalFeatures }}
</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.id == selected_phone.id}">
<td><img ng-src="{{phone.imageUrl}}" class="thumb40"></td>
<td>{{phone.name}}</td>
<td>{{phone.snippet}}</td>
</tr>
</table>
</div>
</div>
</body>
</html>