My application relies on two filter modules:
var app = angular.module('MyApp',['Filter1','Filter2']);
Both modules contain filters with the same name:
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";
}});
If I want to reference the filter from filterapplication1 in my application, how can I do that?
In my HTML, I have:
{{'Hello World' | replace }}
The expected output should be "Hello World from Filter1 app" but it is displaying "Hello World from Filter2 app". How can I override the filters? or do the filters override based on the order they are injected? How can I solve this issue?