I want to pass a value with url using routerLink. And read that value on another page.
Like I have product list. On select of first record the id of that record pass to product detail page. After read that productId I want to show detail of that product.
So How can I pass and get the parameter?
Best Answer
I'm assuming you have some code like this:
in ProductList template
or
where
id
is a variable, maybe you got it in a loop.in ProductDetailComponent:
Router document: https://angular.io/docs/ts/latest/guide/router.html