onsa
12/17/2016 - 12:40 AM

The anatomy of an angular filter.

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;
	};
}]);