what if the filter contains 2 arguments? foe example here is my filter that splits email id and extracts username when specified index:
app.filter('split', function() { return function(input, splitChar, splitIndex) { return input.split(splitChar)[splitIndex]; } });
In the views i can use it with {{signup.email|split:'@':0}}.
How do i use it inside controller according to your method, since my filter contains 2 arguments.
what if the filter contains 2 arguments? foe example here is my filter that splits email id and extracts username when specified index:
app.filter('split', function() {
return function(input, splitChar, splitIndex) {
return input.split(splitChar)[splitIndex];
}
});
In the views i can use it with {{signup.email|split:'@':0}}.
How do i use it inside controller according to your method, since my filter contains 2 arguments.