In my code, I have an array called 'actionsArray' which contains objects of type 'Action'. Each Action object has two parameters: the function name and a boolean value (which is currently not important).
let actionsArray: Action[] = [{name:"save",enabled:true},{name:"describe",enabled:true},{name:"delete",enabled:true}]
To display a list of functions using ngFor, I want to dynamically bind the "click" event of each Action to its corresponding function.
<li *ngFor="let action of actionsArray">
<button (click)="this[action.name]()"> {{action.name}} </button>
</li>
I have tried various methods but have not been successful so far.