admin管理员组文章数量:1405516
I'm having some problems passing data to my routerLink. Here is what I'm trying to do: (this input is inside a ngFor, I need to change the route when the id reaches 4)
<input type="button" class="btn-cards" [ngClass]="getStyle(negociacao)" [routerLink]="['/{{negociacao.rota}}', negociacao.id]" value="{{negociacao.status}}">
The error I'm getting is the following one:
Got interpolation ({{}}) where expression was expected at column 3
Thanks in advance :)
I'm having some problems passing data to my routerLink. Here is what I'm trying to do: (this input is inside a ngFor, I need to change the route when the id reaches 4)
<input type="button" class="btn-cards" [ngClass]="getStyle(negociacao)" [routerLink]="['/{{negociacao.rota}}', negociacao.id]" value="{{negociacao.status}}">
The error I'm getting is the following one:
Got interpolation ({{}}) where expression was expected at column 3
Thanks in advance :)
Share asked Feb 10, 2017 at 13:11 Renê Silva LimaRenê Silva Lima 2,8252 gold badges14 silver badges20 bronze badges1 Answer
Reset to default 7You should not be using {{}}
(interpolation) inside routerLink
directive.
[routerLink]="['/', negociacao.rota, negociacao.id]"
本文标签:
版权声明:本文标题:javascript - Data Bind RouterLink (Angular 2) - Got interpolation ({{}}) where expression was expected at column 3 - Stack Overf 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744917618a2632092.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论