There is a common question I get time to time, so I decided to write about it here.
Let’s say I have an array of people and I filter them on a
ng-repeat, then I want to access that filtered result to do something. I can imagine a few different use cases:
- See how many items matched your search to recalculate your pagination.
- Change the template based on the number of results you have.
- Display a message if you got no results.
- Show the quantity of items returned from your search.