@@ -109,7 +109,7 @@ <h1 class="title">List Tests</h1>
109
109
option-buttons ="optionButtons1 ">
110
110
111
111
<!-- shows that the item directive does not need attributes and can get values from the list attributes -->
112
- < item item ="item " class ="item-message " ng-repeat ="item in items ">
112
+ < item item ="item " class ="item-message " ng-repeat ="item in items " ng-class =" { active: item.isActive} " >
113
113
< img ng-src ="{{item.face}} ">
114
114
< h2 > {{item.from}}</ h2 >
115
115
< p > {{item.text}}</ p >
@@ -153,7 +153,7 @@ <h2>Nic Cage</h2>
153
153
< p > I am not a demon. I am a lizard, a shark, a heat-seeking panther. I want to be Bob Denver on acid playing the accordion.</ p >
154
154
</ div >
155
155
156
- < a class ="item item-icon-left " href ="{{ item.url }} " ng-repeat ="item in urlItems ">
156
+ < a class ="item item-icon-left " href ="{{ item.url }} " ng-repeat ="item in urlItems " ng-class =" { active: item.isActive} " >
157
157
< i class ="icon {{ item.icon }} "> </ i >
158
158
{{ item.text }}
159
159
</ a >
@@ -190,7 +190,7 @@ <h1>YELLOW {{slideBox.slideIndex}}</h1>
190
190
$scope . items = [
191
191
{ from : 'Ben' , face : 'https://pbs.twimg.com/profile_images/378800000571933189/278e8e1b7871a115b95fc550cd07af40.png' , text : 'Did you prepare?' } ,
192
192
{ from : 'Adam' , face : 'https://pbs.twimg.com/profile_images/2927292174/25b170ee2e3044fd936ad1319bc4b82d_bigger.jpeg' , text : 'Don\'t forget to smile!' } ,
193
- { from : 'Tim' , face : 'https://pbs.twimg.com/profile_images/378800000290028838/ee3303b02223f25cb0f9b082b55b2eeb.jpeg' , text : 'Bring some shirts!' }
193
+ { from : 'Tim' , face : 'https://pbs.twimg.com/profile_images/378800000290028838/ee3303b02223f25cb0f9b082b55b2eeb.jpeg' , text : 'Bring some shirts!' , isActive : true }
194
194
] ;
195
195
196
196
@@ -246,7 +246,7 @@ <h1>YELLOW {{slideBox.slideIndex}}</h1>
246
246
247
247
$scope . urlItems = [
248
248
{ text : 'Biography' , icon : 'ion-person' , url : 'http://en.wikipedia.org/wiki/Nicolas_Cage' } ,
249
- { text : 'Fan Club' , icon : 'ion-star' , url : 'http://cagealot.com/' }
249
+ { text : 'Fan Club' , icon : 'ion-star' , url : 'http://cagealot.com/' , isActive : true }
250
250
] ;
251
251
252
252
} ) ;
0 commit comments