The anatomy of an angular filter.
appName.filter('filterName', ['$rootScope', function($rootScope) {
// the returned value is a function that returns a value
return function(input) { // input is the standard input, other optional input can be added
/* some operations with input */
return output;
};
}]);