I am trying to add new HTML code via AJAX to an Angular 5 app and add click event to the elements. But the click event doesn't work as expected, I can't use the 2 way data-binding way because I am using the jQuery data-tables plugins and he add the HTML to the Dom and not the angular template.
I have tried:
<button (click)='myClassFunction()'>Click!</button> this line does nothing
<button onclick='myClassFunction()'>Click!</button> this line said myClassFunction is undefined
<button onclick='this.myClassFunction()'>Click!</button> this line said myClassFunction is undefined
How can I bind this click event to my function?