In angular 1 we are having filters, those filters can be used in both DOM and Typescript/Javascript. In Angular 2 we use pipes to do that stuff, but the pipes are accessible to use only in DOM. Is there any other way to use the pipe function in Typescipt (components)? Please help if anyone knows about this.
Example:
<div *for="let item of items">
{{item.price | priceFilter }}
</div>
I created the user defined pipe called priceFilter
but i want to do the same filtering in Javascript/Typescript.