I have a problem with angular. I got stuck on this:
I get item list from API and iterate over like this:
<div *ngFor="let item of items">
Now I show results in p:
<p> Number: {{item.value.number}} Name: {{item.value.name}}</p>
And the result is shown. But next I need to pass those values to my function.
<button (click)="addToList({{item.value.number}}, {{item.value.name}})">
This is not working. The console says: Parser Error: Got interpolation ({{}}) where expression was expected.
I searched for a long time and not found answer. How to get around this? I don't know how to get these values to my function in another way. Please help. I use newest angular version.