title: AngularJS - custom filter with ngRepeat directive
body: <p>I would like to use my custom filter with ngRepeat directive. Here is what I have</p>
  
  <p>HTML:</p>
  
  <pre><code>&lt;div ng-app="menuApp"&gt;
      &lt;ul ng-controller="MenuCtrl"&gt;
          &lt;li ng-repeat="item in menuItems | rootCategories"&gt;
              {{item.Name}}
          &lt;/li&gt;
      &lt;/ul&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>JS:</p>
  
  <pre><code>angular.module('menuApp', [])
      .filter('rootCategories', function() {
          return function(item) {
              return item.Parent == 0;
          };
      });
  
  function MenuCtrl($scope) {
      $scope.menuItems = [{ "Id": 1, "Name": "Sweep", "Parent": 0 }];
  
      /*
      $scope.rootCategories = function(item) {
          return item.Parent == 0;
      };
      */
  };
  </code></pre>
  
  <p>I do not want to use the commented out way to filter my items, because the real filter will be complicated than in the provided example. For some reasons input parameter "item" is not defined, therefore I see nothing. Could you tell me what is wrong? Thank you.</p>