javascript - AngularJS ng-repeat grid of two divs per row -
i want load data array , display 2 divs per row.
eg: there 8 objects. want them appear in 4 rows of two
1 2
3 4
5 6
7 8
code:
<div ng-repeat="accobj in accountsarr" width="100%"> <div class="col" width="100%"> <div ng-if="$even" style="width:50%;height:70px;background-color:red"> {{accobj.account}}<br> {{accobj.type}} </div> <div ng-if="$odd" style="width:50%;height:70px;background-color:yellow"> {{accobj.account}}<br> {{accobj.type}} </div> </div> </div>
this how code works @ moment. plnkr
can please guide me how desired result?
any highly appreciated.
it css issue - add float:left;
style
of both divs & work.
Comments
Post a Comment