If you use an Angular 2 router, you can pass state through @RouteParams , for example,
<a [routerLink]="['/ProductDetail', {id: 1234}]">Product Details</a>
In this case, id is your state, and it can be any object, for example:
<a [routerLink]="['/ProductDetail', myStateObject]">Product Details</a>
Angular 2, on the other hand, has a mechanism for passing parameters using the parameter binding of the @Input() component, but this can only be used within the same route.
source share