Friday, 15 July 2011

angularjs - condition / directive in Angular ng-repeat -



angularjs - condition / directive in Angular ng-repeat -

i'm starting out angular. have json array of products beingness displayed within ng-repeat , looking add together class every 3rd product.

is there way write status within repeater add together class html element when index%3 2

thanks

sure!

<div ng-repeat='item in items' ng-class='{third: $index%3==2}'>{{item}}</div>

http://plnkr.co/edit/24ne1cyh71inyikxbccc

angularjs angularjs-ng-repeat

No comments:

Post a Comment