1 typescript angular angular10
如何添加字符串插值/连接
到下面的路由器链接,它转到父路由,然后是变量链接?
<a routerLink="../account-information/" + "item.productId">
Run Code Online (Sandbox Code Playgroud)
小智 8
字符串插值
routerLink="../account-information/{{item.productId}}"
Run Code Online (Sandbox Code Playgroud)
属性绑定语法:
[routerLink]="'../account-information/' +item.productId"
Run Code Online (Sandbox Code Playgroud)
或者
[routerLink]="['../account-information/', item.productId]"
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3333 次 |
| 最近记录: |