MANOJ G Thank you. I have tried your approach and it'sh working for a basic scenario where thereis no dependencies required for your filter. If there are dependencies it fails. I guess it must require something similar to directive.
class TestFilter {
constructor(TestService) {
return (input, param1) => {
console.log('Filter Param: ', param1);
return input.slice(1);
}
}
}
TestFilter.$inject = ['TestService'];
export default angular.module('yourApp').filter('letterSlice', () => new TestFilter());