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 badges
Add a ment  | 

1 Answer 1

Reset to default 7

You should not be using {{}}(interpolation) inside routerLink directive.

[routerLink]="['/', negociacao.rota, negociacao.id]"

本文标签: