1
Hey, guys, I got a model
receiving the value of a web api perfectly, but the problem is that I have a function that needs to catch the value of model
and put in the click function as parameter and it gives the following error:
Uncaught Error: Template parse errors:
Parser Error: Got interpolation ({{}}) where expression was expected at column 13 in [PegarValores({{pesquisas.Codigo}})] in ng:///AppModule/FormpesquisaComponent.html@37:49
I don’t know if I’m calling the model the right way, but I’m going to put the code below the model, and the html
for a better understanding of the problem:
HTML
<button class="btn btn-info" (click)="PegarValores({{pesquisas.Codigo}})">
<i class="glyphicon glyphicon-ok" style="color:green;"></i>Iniciar
</button>
MODEL
export class Pesquisa {
public Codigo: number;
public Id: number;
public Nome: string;
}
Okay, it worked, thanks!!
– Bruno Miqueas