So I am having this issue on Angular 4.
I have this button in my html template markup:
<td><a class="btn btn-danger" (click)="delete()"><i class="fa fa-trash"></i></a></td>
I have the data assing to each td from a *ngFor, so I have the {{ data.id }} that I can use on this record, but how can I assign it to my delete method correctly, I tried using:
<td><a class="btn btn-danger" (click)="delete({{ data.id }})"><i class="fa fa-trash"></i></a></td>
<td><a class="btn btn-danger" (click)="delete(id)" [id]={{ data.id }}><i class="fa fa-trash"></i></a></td>
But none seem to work, so any advice or guidance would be greatly appreciated.
(click)="delete(data.id)"?