As stated in the Angular ngRepeat documentation, the alias expression can only be used at the end of the ngRepeat
:
It's important to note that `as [variable name]` is not an operator, but rather a part of the ngRepeat micro-syntax and must be placed at the end (not as operator within an expression).
In my situation with ng-repeat
, I want to filter out items based on a property and then utilize the limitTo
filter for pagination.
Is there a way to determine the number of filtered items before applying the second filter?
Unfortunately, simply using this doesn't work:
item in c.items | filter: c.contextFilter as filteredItems | limitTo: c.pagination.pageSize : c.pagination.currentPage*c.pagination.pageSize
Are there any alternative ways to obtain the value of filteredItems.length
?