angularjs - Nessted Ng-Repeat breaking the inner loop -
i trying render construction nested ng-repeat.
my object construction follows
outercollection: [ { .... .... innercollection: [ // number of objects here variable. can 0 well. {}, {} ] .... }, { .... .... innercollection: [ {}, {} ] .... } ]
now need render inner collection , limit 2.
i need thing similar nested inner loop should execute couple of entries.
foreach(collection in outercollection) { foreach(entry in collection.innercollection) { if(count ==2) break; // , increment count } }
<div ng-repeat="o in outercollection"> <div ng-repeat="innercollection in o|limitto:2"></div> </div>
angularjs angularjs-ng-repeat
No comments:
Post a Comment