Angular 5/6 Tutorial in Hindi Part 23: Create Custom Pipes in Angular 5 in Hindi Step by Step

preview_player
Показать описание
Welcome all, We will see How to Create Custom Pipes in Angular 5 in Hindi. Angular Custom Pipe in Hindi Step by Step. We can write our own custom pipe and that will be used in the same way as angular built-in pipes. To create a custom pipe, angular provides Pipe and PipeTransform interfaces. Every pipe is decorated with @Pipe where we define the name of our custom pipe. Every pipe will implement PipeTransform interface. This interface provides transform() method and we have to override it in our custom pipe class. transform() method will decide the input types, number of arguments and its types and output type of our custom pipe. We perform the following steps to create a custom pipe.

Step 1: Create a typescript class.
Step 2: Decorate the class using @Pipe.
Step 3: Implement PipeTransform interface.
Step 4: Override transform() method.
Step 5: Configure the class in application module with @NgModule.
Step 6: Ready to use our custom pipe anywhere in application.

Guys, Please support my channel by SUBSCRIBE to my channel and share my videos in your Social Network TimeLines.

Don't Forget to Follow me on all Social Network,

Рекомендации по теме
Комментарии
Автор

The nightguard's whistle in the background at 14:14.

priyamganguly
Автор

i write code same as above in angular 9, but getting one error like-
TS2554: Expected 2 arguments, but got 1.
26 {{ articles | customslice }}

saketsonawane
Автор

sir Difference between UI and UX designer main kya hai

dharmraj
Автор

sir mai ek point me phas gaya.. maine cutom pipe banayi exactly aur usse app.module.ts me register bhi kiya.. par wo template parse error nii jaa raha... Please help me

amirmustafa