AngularJS Use a filter in a controller, a service or a filter


Example

You will have to inject $filter:

angular
  .module('filters', [])
  .filter('percentage', function($filter) {
    return function (input) {
      return $filter('number')(input * 100) + ' %';
    };
  });