Angular
Diving Into Angular's Router

Route Params

Mute
Current Time 0:00
/
Duration Time 0:00
Loaded: 0%
Progress: 0%
Stream TypeLIVE
Remaining Time -0:00
 
PRO

Very often we will need to use the information contained in a route param somewhere in our class. In our example app, we need to do so because the user's ID is contained in a param and that value is useful for retrieving data for that particular user before the component loads up. Let's see how we can use the route params observable to get the information we need.

 

I finished! On to the next chapter