I have a table containing the list of feedback. I'm trying to call the function on each looped item.
HTML File:
<ng-container *ngFor="let fd of feedbacks;let i = index">
<tr>
<td>{{ i + 1 }}</td>
<td>{{ fd.feedback }}</td>
<td><button (click)="Analyzer(fd.feedback)">Click me!</button></td>
</tr>
</ng-container>
Attempted action : Set each item as argument to Analyzer() function.
What is the problem?
If you have a function defined in the .ts file
Analyzer(feedback: string) { /* .. */ }
Then what you have will work
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