I'm trying to pass an id in my routerLink, how could I concatenate it?
<a routerLink="['/details', {{data.id}}]"> </a> doesnt work.
Do you have solutions?
Thanks in advance
There you go.
<a [routerLink]="['/details', data.id]"> Link </a>
Parameters go as second item in the array syntax to router link, like this:
[routerLink]="['/details', data.id]
Read more here
{{ }}) in what you have now. You just needdata.idafter the route name. That should work.