Equivalent of $filter() in ionic 2


what’s the equivalent of $filter(‘customfilter’,…) (that we used to use with Angular 1 to apply custom filters from .filter in the controller) in Angular 2 ?


Would a Pipe work for what you need?

Yes, I understand that pipes work in the template {{ data | customPipe }}. But how to use this pipe in the logic of the component (in Typescript) like we were using:

var filteredData = $filter('customFilter', data)