I have a filter, linkifyStuff, in which I want some variables processed using another filter. I can\'t figure out the syntax to call one filter from another.
I know
app.filter('linkifyStuff', function(sanitizeStuffFilter,prettifyStuffFilter) {
return function(text) {
return sanitizeStuffFilter(text) + ' whatever ' + prettifyStuffFilter(text);
}
});
this didnt work out for me. if anyone has problem with the above code. you can try this which worked out for me pretty well.
app.filter('linkifyStuff', function($filter) {
return function(text) {
return $filter('sanitizeStuffFilter')(text) + ' whatever ' + $filter('prettifyStuffFilter')(text);
}
});