I am trying to access a function within a newly created DOM element but I cannot. I do not understand what I am doing wrong.
$scope.createCustomHTMLContent = function(img, evtTime, cmname, evt, cust, serv, descr, duration) {
var html = '<div class="row"><div class="btn-default"><button ng- click="testFun()">Edit</button></div>' + '</div>';
return html;
}
rows.push([""+cmname, ""+id,$scope.createCustomHTMLContent(thumbpath, evtTime, cmname, evt, cust, serv, descr, 0),new Date(datetime), new Date(datetime1),'color:'+colors[serv]]);
chart.draw(dataTable, options);
The code is alot, so I tried to include what is necessary only. Please let me know if you need any clarity.
Basically the button is displayed as a tooltip. but when I click it does not call the testFun function. Thank you