AngularJS programatically call filter from service (sort by custom filter) AngularJS programatically call filter from service (sort by custom filter) angularjs angularjs

AngularJS programatically call filter from service (sort by custom filter)


You can see guide for filters

So in your case depends from defininition .filter('translate', you can use it like

.controller('StringsController', function(blabla, $filter) {    //simple transtale    var translatedString = $filter('translate')(stringForTranslate);    //ordering    var ordered = $filter('orderBy')(arrayForOrdering,function(el){ return  $filter('translate')(el); })});