Pipes in Angular are used to format / transform data and display it in the UI. Pipes are not new in Angular, for those familiar with AngularJS can connect the same concept in Angular. The very basic pipe takes one input followed by the pipe | symbol which is again followed by the type of pipe to be used for transformation.
<input> | <pipe type>
Pipes can have additional parameters to add more formatting / specification on how the transformation should be done, parameters are followed by the pipe type with a colon : symbol
<input> | <pipe type> : <parameter>
Pipes can have multiple parameters chained in sequence, each parameter in the chain is separated with a colon : symbol
<input> | <pipe type> : <parameter1> : <parameter2> . . . : <parameterN>
<input> | <pipe type>
Pipes can have additional parameters to add more formatting / specification on how the transformation should be done, parameters are followed by the pipe type with a colon : symbol
<input> | <pipe type> : <parameter>
Pipes can have multiple parameters chained in sequence, each parameter in the chain is separated with a colon : symbol
<input> | <pipe type> : <parameter1> : <parameter2> . . . : <parameterN>
No comments:
Post a Comment