Linking an existing filter inside a custom filter?
I have a custom filter that uses a filter number
and a custom filter partspermillion
that adds "ppm" at the end. I am currently linking my filters i.e. input | number | partspermillion
... However I find it long to input, I want my custom filter to use the number filter every time. The code looks like this:
.filter('partspermillion', function() {
return function (input) {
return input + 'ppm';
}
})
+3
source to share