Reputation: 1382
I need users to be able to change how many entries they should see that the reason I need to use limitTo
in ng-repeat
but I also need to be able to let them see all the entries so how do I set it to unlimited?
example:
<div ng-repeat="person in people | limitTo:limitPeople">
<!--- som entry -->
</div>
Upvotes: 1
Views: 1283
Reputation: 594
If u change the value to undefined the filter should not apply so everything should be shown.
If limit is undefined, the input will be returned unchanged.
Upvotes: 3