I'm trying to create a grid using bootstrap 3 and angularjs.
The grid I'm trying to create is this, repeated using ng-repeat.
<div class=row>
<div class=col-md-4>item</div>
<div class=col-md-4>item</div>
<div class=col-md-4>item</div>
</div>
I've tried using ng-if
with ($index % 3 == 0)
to add the rows, but this doesn't seem to be working right. Any suggestions would be great!
Thank you!
EDIT: Here's the code I ended up going with that worked:
<div ng-repeat=item in items>
<div ng-class=row|($index % 3 == 0)>
<ng-include class=col-sm-4 src='views/items/item'></ng-include>
</div>
</div>