So, I'm trying to get the total length of the filtered array in AngularJS after I used LimitTo so that the application displays more than a certain number of elements at a time. The code is as follows:
<span>Results: {{filtered.length}}</span>
<li ng-repeat = "element in filtered = (array | filter:selectedTag | limitTo:load.number)">
I expect about 150 final results, but I will limit myself to showing 25 pieces. I want the results to display the total length of the filtered array, not just the limited version. Is there any angular code to get this without running the filter again?
source
share