Joined October 2014
·

KV Yadav

hyderabad
·
·

angularjs error injector unpr unknown provider sortcriteriaFilterProvider <- sortcriteriaFilter

$scope.sortcriteria = function($scope.chapters) {
    var filtered = [];
        for (var i = 0; i < $scope.chapters.length; i++) {
            var chapter = $scope.chapters[i];
            var chapterName = chapter.name;
            var n = chapterName.indexOf(":");
            if (i==(n-1)) {
                filtered.push(chapter);
            }
        }
        return filtered;
    };// this is my function in controller<span ng-repeat="chapter in chapters  | filter:sortcriteria">  this is my view file filter

unable to find the error could you help me out

Achievements
1 Karma
0 Total ProTip Views