Thomas Laforge's Angular Challenges (#22) router-input solution.
- Angular CLI version 16.2.0.
- Angular
- I left the activatedRoute code.
- I used transform to make the testId a number instead of a string.
- I think the transform property makes the @Input strategy more useful than activatedRoute.
- Also, you don't have to differentiate between params / queryParams with @Input().
- I renamed permission to have a different name - you pass the name defined in the route to @Input() and then you can change the variable to something else.
In this small application, you can pass data though routing to TestComponent. v16 of Angular introduced RouterInput. The goal of this exercice is to refactor the code to use the new RouterInput strategy.
- FreeCodeCamp - use input for angular route parameters
