Saturday, July 6

Angular Js : What if you want to update the count of search results for filter search?

What a better way to spend a weekend then learn a new framework. Started my day with angular js and their documentation and examples are pretty good for beginners like me. I decided to get my hands dirty and play around with their example code step by step.

While working i wanted to update the count of the number of phones depending on the result while searching. If the search result displayed 10 phones, then the count of phone should automatically be udpated to 10 and so on.

Stackoverflow has already covered this:

The most easy to understand solution i found was to update the length via the filter like below

Found phones : {{(phones | filter : query).length}}

Be the first one to Comment!!!

Post a Comment