July 2017
Intermediate to advanced
454 pages
10h 1m
English
The pipe operator is defined with a pipe symbol, (|), followed by the name of the pipe:
{{ appvalue | pipename }}
The following is an example of a simple lowercase pipe:
{{"Sridhar Rao" | lowercase}}
In the preceding code, we are transforming the text to lowercase using the lowercase pipe.
Now, let's write an example Component using the lowercase pipe example:
@Component({ selector: 'demo-pipe', template: ` Author name is {{authorName | lowercase}} `})export class DemoPipeComponent { authorName = 'Sridhar Rao';}
Let's analyze the preceding code in detail:
Read now
Unlock full access