My application depends on two filter applications like
var app = angular.module('MyApp',['Filter1','Filter2']);
where both the applications have filters with same name like
var filterapp1 = angular.module('Filter1',[]);
filterapp1.filter('replace',function(){return function(input){
return input + " from Filter1 app";
}});
var filterapp2 = angular.module('Filter2',[]);
filterapp2.filter('replace',function(){return function(input){
return input + " from Filter2 app";
}});
Now in my application if i want to refer the filter from the filterapplication1, How can i can i do?
In my HTML i have something like
{{'Hello World' | replace }}
where the output should be "Hello World from Filter1 app" but i am getting "Hello World from Filter2 app". How to override the filters? Or do filters override by order they are injected? How to overcome this?