Q:

AngularJS - custom filter with ngRepeat directive

I would like to use my custom filter with ngRepeat directive.  Here is what I have
HTML:
<div ng-app="menuApp">
    <ul ng-controller="MenuCtrl">
        <li ng-repeat="item in menuItems | rootCategories">
            {{item. Name}}
        </li>
    </ul>
</div>

JS:
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;
    };
    */
};

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. 

A:

Please have a look at this fiddle.  http://jsfiddle.net/bKFXy/.
This uses the syntax of passing a predicate object as the filter expression. 
item in menuItems | filter:{Parent:0}
There is another method for filtering and the fiddle for that is here http://jsfiddle.net/kd5dv/

