Author: Thomas Laforge
The goal of this serie of 3 pipe challenges is to master PIPES in Angular.
Pure pipe are a very useful way to transform data from your template. The difference between calling a function and a pipe is that pure pire are memoized. So they won't be recalculated every change detection cycle if the inputs hasn't changed.
In this second exercice, you are calling multiple functions inside your template. You can create a specific pipe for each of the functions but this will be too cumbersome.
The goal is to create a wrapFn
pipe to wrap your callback function though a pipe. Your function MUST remain inside your component. WrapFn
must be highly reusable.
- must be strongly typed
- Fork the project
- clone it
- npm ci
npx nx serve pipe-intermediate
- ...work on it
- Commit your work
- Submit a PR with a title beginning with Answer:9 that I will review and other dev can review.