Slice By Index With Increment
I have something like this: {{$index+1}} - {{atma.weapon}}
Solution 1:
1st:
<divng-repeat="atma in data"><ulng-if="$index % 3 == 0"><li><span>{{data[$index]}} </span></li><ling-if="$index+ 1 < data.length"><span>{{data[$index+1]}} </span></li><ling-if="$index+ 2 < data.length"><span>{{data[$index+2]}} </span></li></ul></div>
2nd:
<divng-repeat="atma in data"><ulng-if="$index % 3 == 0"ng-init="tmp = data.slice($index, $index + 3)"><ling-repeat="atma1 in tmp"><span>{{atma1}}</span></li></ul></div>
http://plnkr.co/edit/Uo1ROo549swNorzixTi3?p=preview
Post a Comment for "Slice By Index With Increment"