Wednesday, 2 May 2018

Custom Pipes in Angular 2.

In this article, We will discuss about Custom Pipes in Angular 2.

Pipe Created by developer to the requirement is called Custom Pipe.

Custom Pipe is a class implementing PipeTransform interface by overriding Transform method, this class should be applied with Pipe decorator.

Syntax:-
----------

@Pipe({
     name:"PipeName"
});

export class <classname> implements PipeTransform
{
       public transform(para1:type,para2:type):type
       {
         ........
       }
}

para 1 will receive data, this data can be transformed into required format.

para 2 will receive an option to be applied to data, it is an optional parameter.

2 comments:

  1. Really cool post, highly informative and professionally written and I am glad to be a visitor of this perfect blog, thank you for this rare information
    Angular JS Online training
    Angular JS training in Hyderabad

    ReplyDelete
  2. Thank You so much for your effort in sharing such a wonderful blog with us.
    Thanks for giving a great information It is very useful.Thanks for sharing.
    oracle training in chennai

    oracle training institute in chennai

    oracle training in bangalore

    oracle training in hyderabad

    oracle training

    hadoop training in chennai

    hadoop training in bangalore



    ReplyDelete