I need to dynamically add a click event to an div tag:
<div *ngIf="item.click">
<div (click)="item.click" >{{item.name}} (should trigger( {{item.click}})</div>
</div>
My object looks like this:
item: {name: 'Action', click: '_actionService.triggerAction()'}
I don't get any error when running the code but the click event doesn't seem to have been created.
Any suggestions?