When working in Angular 1, we have the ability to use filters in both the DOM and Typescript/Javascript. However, when using Angular 2, we utilize pipes for similar functionality, but these pipes can only be accessed within the DOM. Is there a different approach to incorporating pipe functions in Typescript (components)? If anyone has insight on this matter, please provide assistance.
For example:
<div *for="let item of items">
{{item.price | priceFilter }}
</div>
I have created a custom pipe named priceFilter
, but I am interested in achieving the same filtering capabilities in Javascript/Typescript.