As an alternative syntax, you can also directly insert a filter without going through the $filter service. For example, to add a filter filter to a controller, you can write:
MyCtrl = function($scope, filterFilter) { $scope.filtered = filterFilter(myArray, expression); }
A question very similar to How to use a filter in a controller?
pkozlowski.opensource Feb 18 '13 at 13:10 2013-02-18 13:10
source share