1

How do I add string interpolation/concatenation

to router link below which goes to parent route, and then variable link?

 <a routerLink="../account-information/" + "item.productId">

1 Answer 1

8

String Interpolation

routerLink="../account-information/{{item.productId}}"

Attribute Binding Syntax:

[routerLink]="'../account-information/' +item.productId" 

or

[routerLink]="['../account-information/', item.productId]"
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.