Well, I did some research before asking this question. I thought this is very straight forward as this common scenario.
This is my anchor tag.
<a [routerLink]="['./product', 1]">Vitamins</a>
When use click on that I am getting data by passing the Id to Web API. After getting data, the Url shows up as http://localhost:4200/product/1.
In my route, I configured this as
{ path: 'product/:id', component: ProductComponent },
I would like to modify this URL as http://localhost:4200/vitamins which makes more sense. How can I do this ?
The closest I found is this but this is not what I am looking for