I am getting data in abc.component.ts
and trying to pass
this data to component which is routed.`
This data should not be pass alongwith routes, since it is a json object and it can be very big data and route url will expose data.
.ts
data = {"key":1,"value":2}
this.router.navigate(['dashboard']); //<=== when routing pass 'data' into dashboard.component.ts
this.router.navigate(['page']); //<=== when routing pass 'data' into page.component.ts
.html
<router-outlet></router-outlet>
dashboard.component.ts
alert(data) <============ requirement