-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathapp.controller.js
172 lines (158 loc) · 5.56 KB
/
app.controller.js
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
var main = angular.module('myApp', []);
main.controller('FormController', function(){
this.review = {};
this.addReview = function(phone){
phone.reviews.push(this.review);
this.review = {};
};
});
main.controller('ListController', function(){
this.selectedItem;
this.index;
this.isSelected = function(item){
return item === this.selectedItem;
};
this.setSelect = function(item, age){
this.selectedItem = item;
this.index = age;
};
this.phones = [
{
"age": 0,
"id": "motorola-xoom-with-wi-fi",
"imageUrl": "img/motorola-xoom-with-wi-fi.1.jpg",
"name": "Motorola XOOM\u2122 with Wi-Fi",
"snippet": "The Next, Next Generation\r\n\r\nExperience the future with Motorola XOOM with Wi-Fi, the world's first tablet powered by Android 3.0 (Honeycomb).",
"reviews":[
{
body: "Such a good model",
author: "[email protected]"
}
]
},
{
"age": 1,
"id": "motorola-xoom",
"imageUrl": "img/motorola-xoom.0.jpg",
"name": "MOTOROLA XOOM\u2122",
"snippet": "The Next, Next Generation\n\nExperience the future with MOTOROLA XOOM, the world's first tablet powered by Android 3.0 (Honeycomb).",
"reviews":[
{
body: "Dont like it that much, but it is pretty cheap",
author: "[email protected]"
},
{
body: "Its the best model out there people should try it it is awesome, really people try it",
author: "[email protected]"
}
]
},
{
"age": 2,
"carrier": "AT&T",
"id": "motorola-atrix-4g",
"imageUrl": "img/motorola-atrix-4g.0.jpg",
"name": "MOTOROLA ATRIX\u2122 4G",
"snippet": "MOTOROLA ATRIX 4G the world's most powerful smartphone.",
"reviews":[
{
body: "Ya no se que mas inventar AIUDA",
author: "[email protected]"
},
{
body: "Its the best model out there people should try it it is awesome, really people try it, All of us should try it",
author: "[email protected]"
}
]
},
{
"age": 3,
"id": "dell-streak-7",
"imageUrl": "img/dell-streak-7.0.jpg",
"name": "Dell Streak 7",
"snippet": "Introducing Dell\u2122 Streak 7. Share photos, videos and movies together. It\u2019s small enough to carry around, big enough to gather around.",
"reviews": []
},
{
"age": 4,
"carrier": "Cellular South",
"id": "samsung-gem",
"imageUrl": "img/samsung-gem.0.jpg",
"name": "Samsung Gem\u2122",
"snippet": "The Samsung Gem\u2122 brings you everything that you would expect and more from a touch display smart phone \u2013 more apps, more features and a more affordable price.",
"reviews": []
},
{
"age": 5,
"carrier": "Dell",
"id": "dell-venue",
"imageUrl": "img/dell-venue.0.jpg",
"name": "Dell Venue",
"snippet": "The Dell Venue; Your Personal Express Lane to Everything",
"reviews":[
{
body: "Such a good model congrats, esta chidi",
author: "[email protected]"
}
]
},
{
"age": 6,
"carrier": "Best Buy",
"id": "nexus-s",
"imageUrl": "img/nexus-s.0.jpg",
"name": "Nexus S",
"snippet": "Fast just got faster with Nexus S. A pure Google experience, Nexus S is the first phone to run Gingerbread (Android 2.3), the fastest version of Android yet.",
"reviews": []
},
{
"age": 7,
"carrier": "Cellular South",
"id": "lg-axis",
"imageUrl": "img/lg-axis.0.jpg",
"name": "LG Axis",
"snippet": "Android Powered, Google Maps Navigation, 5 Customizable Home Screens",
"reviews": []
},
{
"age": 8,
"id": "samsung-galaxy-tab",
"imageUrl": "img/samsung-galaxy-tab.0.jpg",
"name": "Samsung Galaxy Tab\u2122",
"snippet": "Feel Free to Tab\u2122. The Samsung Galaxy Tab\u2122 brings you an ultra-mobile entertainment experience through its 7\u201d display, high-power processor and Adobe\u00ae Flash\u00ae Player compatibility.",
"reviews": []
},
{
"age": 9,
"carrier": "Cellular South",
"id": "samsung-showcase-a-galaxy-s-phone",
"imageUrl": "img/samsung-showcase-a-galaxy-s-phone.0.jpg",
"name": "Samsung Showcase\u2122 a Galaxy S\u2122 phone",
"snippet": "The Samsung Showcase\u2122 delivers a cinema quality experience like you\u2019ve never seen before. Its innovative 4\u201d touch display technology provides rich picture brilliance, even outdoors",
"reviews":[
{
body: "Me Gusta el sistema operativo de este artefacto",
author: "[email protected]"
},
{
body: "Me Gusta el sistema operativo de este artefacto",
author: "[email protected]"
}
]
},
{
"age": 10,
"carrier": "Verizon",
"id": "droid-2-global-by-motorola",
"imageUrl": "img/droid-2-global-by-motorola.0.jpg",
"name": "DROID\u2122 2 Global by Motorola",
"snippet": "The first smartphone with a 1.2 GHz processor and global capabilities.",
"reviews":[
{
body: "Such a good model",
author: "[email protected]"
}
]
}
];
});