Coding task · Angular course · Module 4: Routing

Practice: Reading parameters

ActivatedRoute gives access to path parameters. Since Angular 16 route parameters can also go straight into component inputs (withComponentInputBinding(), since Angular 17.1 also into input()), but here we read them from ActivatedRoute.

Task

Complete the component to read the 'id' parameter from the URL using inject() and ActivatedRoute.