title: AngularJS programatically call filter from service (sort by custom filter)
body: <p>I have a the following situation (a translation filter in a service, used in the HTML file)</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>// serviceFile
  angular.module('myModule')
    .service('translation')
    .filter('translate', function(translation) {
      // translate stuff
      return 'translatedString';
    });
  
  // controllerFile
  angular.module('myModule')
    .controller('StringsController', function(blabla, translation) {
      $scope.mySort = function() {
        return "some magic should happen here";
      };
    });
  
  // htmlFile
  &lt;tr ng-repeat="string in strings"&gt;
    &lt;td&gt; 
        {{ string | translate: 'name' }} 
    &lt;/td&gt;
  &lt;/tr&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>(The above code works, but perhaps some vital parts were omitted due to my lack of experience)</p>
  
  <p>My issue is that I am requested to sort based on the translated values (something like <code>string in strings | orderBy: mySearch</code>) and I can't find how to call the filter programatically from the <code>StringsController.mySearch</code></p>
  
  <p>P.S. the filter is not returned from the service (don't know if this is relevant)</p>