Custom Pipes in Angular
Hi Everyone, in my last article I have given deep instructions about the angular built-in pipes. In here I’m going to explain about Custom Pipes.
For Example, I’m going to take the date format pipe.
First, you have to create your Angular project.
After that in your app.component.ts file,
here, if we are using custom pipes, we can show our birthday date in a different format.
first, we have to create a custom pipe file.
so I have created as custom.datepipe.ts file
After that should import CustomDatePipe in app.module.ts file
In app.component.html
Let’s look at the results!
We have got our birthday in given format!
if we want we can change our format and display using custom Pipes!
Thank You, Everyone!
hope you will understand about custom pipes!
References!