Recently, I started using AngularJS version 1.4.x.
{{ limitTo_expression | limitTo : limit : begin}}
In my ng-repeat loop, I want to apply a limitTo:10:{head.value}* 10 filter. But I am not sure how to make it work correctly.
I am trying to incorporate operations in the limitTo syntax and hoping for a solution that works smoothly.
Here is what I am aiming for:
<div ng-repeat='head in heads' class='row'>
<div class='colhead'></div>
<div ng-repeat='item in items |limitTo:10:{head.value}* 10' class='colNumber'>
<div ng-if='items.indexOf(item) == 0' id='ck-button'>
<label>
<input id={{item.value}} type='checkbox' value={{item.value}} ng-model='item.select' ng-click='toggleAll(item)'> <span> {{item.value}} </span>
</label>
</div>
<div ng-if='items.indexOf(item) !=0' id='ck-button'>
<label>
<input id={{item.value}} type='checkbox' value={{item.value}} ng-model='item.select' ng-click='toggle(item.value, selected)'> <span> {{item.value}} </span>
</label>
</div>
</div>
</div>
You can also refer to my code example on Plunkr platform by clicking here.