The pipe operator

By looking at the highlighted lines of the preceding source code, we can see how we used the pipe operator (|), which is another useful tool coming from the Angular Template Syntax.

To quickly summarize what it does, we can say the following: the pipe operator allows the use of some transformation functions that can be used to perform various tasks such as format strings, join array elements into a string, uppercase/lowercase a text, and sort a list. Here are the pipes that come built-in with Angular: DatePipe, UpperCasePipe, LowerCasePipe, CurrencyPipe, PercentPipe, and JsonPipe; these are all available for use in any template. Needless to say, we used the latter in the preceding script to transform the form.value and

Get ASP.NET Core 2 and Angular 5 now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.