docs(pipes): add information and statement titles

This commit is contained in:
Sven Brodny
2024-02-16 22:30:46 +01:00
parent ee5fae726e
commit 5886a0f0c9
3 changed files with 8 additions and 4 deletions

View File

@@ -8,6 +8,8 @@ sidebar:
order: 202 order: 202
--- ---
## Information
This is the third of three `@Pipe()` challenges, the goal of this series is to master **pipes** in Angular. This is the third of three `@Pipe()` challenges, the goal of this series is to master **pipes** in Angular.
Pipes are a very powerful way to transform data in your template. The difference between calling a function and a pipe is that pure pipes are memoized. So they won't be recalculated every change detection cycle if their inputs haven't changed. Pipes are a very powerful way to transform data in your template. The difference between calling a function and a pipe is that pure pipes are memoized. So they won't be recalculated every change detection cycle if their inputs haven't changed.
@@ -23,10 +25,10 @@ A **impure** pipe is called every change detection cycle.
There are some useful predefined pipes like the DatePipe, UpperCasePipe and CurrencyPipe. To learn more about pipes in Angular, check the API documentation [here](https://angular.io/guide/pipes). There are some useful predefined pipes like the DatePipe, UpperCasePipe and CurrencyPipe. To learn more about pipes in Angular, check the API documentation [here](https://angular.io/guide/pipes).
## Information: ## Statement
In this exercise, you want to access utils functions. Currently you cannot access them directly from your template. The goal is to create a specific pipe for this utils file, where you will need to pass the name of the function you want to call and the needed arguments. In this exercise, you want to access utils functions. Currently you cannot access them directly from your template. The goal is to create a specific pipe for this utils file, where you will need to pass the name of the function you want to call and the needed arguments.
## Constraints: ## Constraints
- Must be strongly typed - Must be strongly typed

View File

@@ -24,7 +24,7 @@ A **impure** pipe is called every change detection cycle.
There are some useful predefined pipes like the DatePipe, UpperCasePipe and CurrencyPipe. To learn more about pipes in Angular, check the API documentation [here](https://angular.io/guide/pipes). There are some useful predefined pipes like the DatePipe, UpperCasePipe and CurrencyPipe. To learn more about pipes in Angular, check the API documentation [here](https://angular.io/guide/pipes).
## Information ## Statement
In this exercise, you need to refactor a transform function inside a component, which is called inside your template. The goal is to convert this function to a pipe. In this exercise, you need to refactor a transform function inside a component, which is called inside your template. The goal is to convert this function to a pipe.

View File

@@ -9,6 +9,8 @@ sidebar:
order: 103 order: 103
--- ---
## Information
This is the second of three `@Pipe()` challenges, the goal of this series is to master **pipes** in Angular. This is the second of three `@Pipe()` challenges, the goal of this series is to master **pipes** in Angular.
Pipes are a very powerful way to transform data in your template. The difference between calling a function and a pipe is that pure pipes are memoized. So they won't be recalculated every change detection cycle if their inputs haven't changed. Pipes are a very powerful way to transform data in your template. The difference between calling a function and a pipe is that pure pipes are memoized. So they won't be recalculated every change detection cycle if their inputs haven't changed.
@@ -24,7 +26,7 @@ A **impure** pipe is called every change detection cycle.
There are some useful predefined pipes like the DatePipe, UpperCasePipe and CurrencyPipe. To learn more about pipes in Angular, check the API documentation [here](https://angular.io/guide/pipes). There are some useful predefined pipes like the DatePipe, UpperCasePipe and CurrencyPipe. To learn more about pipes in Angular, check the API documentation [here](https://angular.io/guide/pipes).
## Information: ## Statement
In this exercise, 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. In this exercise, 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.** 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.**