·
1. On the html page, use like:
<a [routerLink]="['/product',product.id]">{{product.name}}</a>
2. After that, in component (.ts) file:
a) Inject ActivatedRoute in constructor like:
constructor(private _Activatedroute: ActivatedRoute){}
b) After that, use like:
const _id= this._Activatedroute.snapshot.paramMap.get("id");