title: Pass the current element to custom filter in ng-repeat
body: <p>Is it possible to pass the current element of <code>ng-repeat</code> to a custom filter?</p>
  
  <p>Somehow like this (HTML):</p>
  
  <pre><code>&lt;ul&gt;
      &lt;li ng-repeat="row in rows | myFilter:row:anotherArgument&gt;{{row}}&lt;/li&gt;
  &lt;/ul&gt;
  </code></pre>
  
  <p>and (Javascript):</p>
  
  <pre><code>angular.module('myApp', [])
      .filter('myFilter', function() {
          return function(items, item, arg) {
              // Do something here
          }
      });
  </code></pre>
  
  <p>The data I'm dealing with looks like this (simplified):</p>
  
  <pre><code>[
      {
          "id":"52d7d22867960cb905e1c5b3",
          "label":"Model A",
          "children":[
              {
                  "id":"52d7d22967960cb905e1c5bf",
                  "type":"Page",
                  "label":"Sample Page A",
                  "class":"page",
                  "children":[...],
                  "watched":false
              },
              {...},
              {
                  "id":"52d7d22967960cb905e1c5bd",
                  "label":"Page",
                  "class":"type"
              }
          ],
          "class":"model",
          "watched":false
      },
      {...}
  ]
  </code></pre>
  
  <p>So basically I have a tree like structure and in the first layer, there may be one or more elements with <code>"class":"type"</code>. The nested data is handled by Nick Perkins' <a href="https://github.com/nickperkinslondon/angular-bootstrap-nav-tree" rel="nofollow">angular-bootstrap-nav-tree</a> directive.
  I want to only display the elements that have <code>"watched":true</code>. The problem is of course, that the elements of <code>"class":"type"</code>, don't have the <code>watched</code> attribute.</p>
  
  <p><strong>tl;dr</strong><br>
  Filter out <code>"watched":false</code> but keep elements with <code>"class":"type"</code></p>