I\'ve been trying to find a simple solution.
I have a for loop displaying a list of items. clicking on one of the items routes you to the detailed component and I just wa
From Angular 7.2 you can pass argument to router, see this great link
In .html you must use [state], e.g.
Two get the state you has two options, from a component not main-app, see
this answer, from the main-app you can subscribe to router.events
this.router.events.pipe(
filter(e => e instanceof NavigationStart),
map(() => this.router.getCurrentNavigation().extras.state)
).subscribe((res:any)=>{
console.log(res)
})
NOTE: if use this aproach, remember that if you access directly to your "item-details.component", you has any "item"