January 2019
Intermediate to advanced
240 pages
5h 59m
English
This chapter covers
transform methodOften, you’ll want to modify data that’s displayed in a template. For example, you may want to format a number as currency, transform a date into a format that’s easier to understand, or make some text uppercase. In situations like these, Angular provides a way to transform data using something known as a pipe.
Pipes take input, transform it, and then return some transformed value. Because the way pipes operate is straightforward, writing tests for them is too. Pipes depend only on their input. A function whose output depends on only the input passed to it is known as a pure function.
When a function ...
Read now
Unlock full access