Accessing Navigation Data

Learn how to retrieve URL parameters and access navigation data using the ActivatedRoute module.

In the previous lesson, we learned how to programmatically implement navigation within our page component classes using the navigate and navigateByUrl Angular Router methods.

This is all fine but how would we retrieve the URL parameter that has been posted via these methods?

Using the ActivatedRoute module

Within the DetailsPage component, we could make use of the ActivatedRoute module of the @angular/router library package and its methods, like so:

Get hands-on with 1200+ tech skills courses.