I'm trying to call a declared function from my filter module:
filterModule.filter({
functionFilterOne: ['CustomService', functionIDOne],
functionFilterTwo: ['CustomService', functionIDTwo],
});
function functionIDOne(id) {
return function(id) {
return id + "PREFIXOne";
}
}
function functionIDTwo(id) {
return function(id) {
return id + "PREFIXTwo";
}
}
In html :
{{ elet.id | functionFilterOne: functionIDOne}}
I would like to create a generic filter module for the app that containe many filter.
I don't know how to call it correctly in my html, any idea. I got the error :
angular.js:13283 Error: [$injector:unpr] Unknown provider: functionFilterOneProvider <- functionFilterOne<-
I followed the links Link for separate filter and link filter with many function