I am new to jquery datatable. I am using jquery datatable in angular 5. I am facing problem with dynamic row add functionality.
addNewrow() {
this.dataTable.row.add([<button onclick="myFun()" name="btn1">btn</button>,1,2,3]).draw(true);
}
the above code used in angular 5. In above code as you can see I have added button to jquery datatble addNewrow()is angular function that contains jquery code. and I have triggered onClick event on the button(btn1) which gives a call to a myfun(). My problem is I am not able to call that myfun() in button. Please can you let me know the solution