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 :)
You should not be using {{}}(interpolation) inside routerLink directive.
[routerLink]="['/', negociacao.rota, negociacao.id]"
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With