For this route:
{path: 'my/:id', component: MyDashboardComponent},
this is how you can use it in MyDashboardComponent
:
constructor(private route: ActivatedRoute) { this.route.params.subscribe(params => { console.info(params.id); }) }
For this route:
{path: 'my/:id', component: MyDashboardComponent},
this is how you can use it in MyDashboardComponent
:
constructor(private route: ActivatedRoute) { this.route.params.subscribe(params => { console.info(params.id); }) }
If this post helped you, please consider buying me a coffee or donating via PayPal to support research & publishing of new posts on TechOverflow