Einius
Einius

Reputation: 1382

AngularJS set limitTo to unlimited in ng-repeat

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

Answers (1)

stackg91
stackg91

Reputation: 594

limitTo Docs

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

Related Questions