From Filters To Pipes
Angular CLI Pipe Scaffolding
Using A Pipe In Your Template
Using Your Pipe In The TypeScript
Although you will often see pipes being used in the HTML with the pipe symbol, you can also make use of your pipes directly from the TypeScript code. Since our pipe is just a TypeScript class we can treat it like a regular old class. That means if we want to use our pipe to transform some data all we need to do is instantiate the pipe and call it's trandform method! Wow!