mirror of
https://github.com/Raghu-Ch/angular-challenges.git
synced 2026-02-10 12:53:03 -05:00
docs(challenge22): update readme
This commit is contained in:
@@ -5,15 +5,24 @@ sidebar:
|
||||
order: 5
|
||||
---
|
||||
|
||||
:::note
|
||||
WIP: The following documentation will be reviewed and improved. However, you can still take on the challenge. If you don't understand a certain part, please feel free to reach out or create an issue.
|
||||
:::
|
||||
|
||||
<div class="chip">Challenge #22</div>
|
||||
|
||||
## Information
|
||||
|
||||
In this application, we retrieve three pieces of information inside our `TestComponent` provided by the router:
|
||||
|
||||
- We want to retrieve `testId` found inside the params of the URL.
|
||||
- We want to obtain `user` located within the query parameters of the URL.
|
||||
- We want to access `permission` set inside the `data` object of the route.
|
||||
|
||||
In Angular versions 15 or earlier, we use `ActivatedRoute` to obtain all this information and receive them through observables to listen for URL changes.
|
||||
|
||||
In version 16, Angular introduced a new `Input` that can listen to route data. You can read more about it [here](https://medium.com/ngconf/accessing-route-params-in-angular-1f8e12770617).
|
||||
.
|
||||
|
||||
## Statement
|
||||
|
||||
In this small application, you can pass data though routing to `TestComponent`. v16 of Angular introduiced `RouterInput`. The goal of this exercice is to refactor the code to use the new `RouterInput` strategy.
|
||||
The goal of this exercice is to refactor the code to use the new `RouterInput` strategy.
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user