Reputation: 45
I have a <a>
tag
<a [routerLink]='[{ outlets: { userDetail: ["user/" + user.id] } }]'>
<h4>{{user.name}}</h4>
</a>
<router-outlet name="userDetail"></router-outlet>
but finally this replaced to http://localhost:4200/users/(userDetail:user%2F1).
How I can change "%2F" to "/" ?
Upvotes: 2
Views: 413
Reputation: 38094
Try to declare without +
and /
signs and use ,
:
<a [routerLink]='[{ outlets: { userDetail: ['user', user.id] } }]'>
<h4>{{user.name}}</h4>
</a>
Upvotes: 2