Get Length Of Filtered Data In Angular Js

Posted by Weston Ganger on August 20, 2014

You might need the length of filtered data in Angular such as how many posts include the word "angular"

This can be done using the following method:

<div ng-repeat="post in filtered = (data | filter: 'angular')">
  <div> {{filtered.length}} </div>

Posted in Angular and Tagged with ngularjs filter 

Want me to help develop your next project or application?

Contact Us

Specializing in Ruby-on-Rails, Javascript, Multi-Platform Electron Desktop Apps and Hybrid Cordova Mobile Apps.

Recommended Posts