In this lecture you are going to learn how to create a custom pipe in Angular. The Pipes are a great way to transform the appearance of elements in the template. The Angular comes with some great built-in pipes like Date pipe, Currency pipe, and Number pipe, etc. But if these pipes do not cover your needs, then we can create our own custom pipe in Angular.
To create a custom pipe, first we need to create a pipe class. The pipe class must implement the PipeTransform interface. We also decorate it with @pipe decorator. Give a name to the pipe under name metadata of the @pipe decorator. Finally, we create the transform method, which transforms given value to the desired output.
Let's learn how to create and use a custom pipe in Angular.
DOWNLOAD SECTION SOURCE CODE HERE: https://drive.google.com/file/d/11f5j...