title: How to count items inarray by attribute in Angular JS?
body: <p>In my contrller.js I have array 'arr'</p>
  
  <p>Like This :</p>
  
  <pre><code>$scope.arr = [
     {block: 0},
     {block: 1},
     {block: 1},
  ]
  </code></pre>
  
  <p>I want to count items with <code>block : 1</code> but not using <code>ng-repeat</code>?
  I tried:</p>
  
  <pre><code>{{arr.lenght | filter:block == '1'}}
  </code></pre>