![](/img/trans.png)
[英]Angular 2 routerLink in parent component relative to child route?
[英]Angular Routerlink : Concatenate Parent Route String with Variable
如何添加字符串插值/串聯
到下面的路由器鏈接,然后轉到父路由,然后是可變鏈接?
<a routerLink="../account-information/" + "item.productId">
字符串插值
routerLink="../account-information/{{item.productId}}"
屬性綁定語法:
[routerLink]="'../account-information/' +item.productId"
或者
[routerLink]="['../account-information/', item.productId]"
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.