I'm following line which makes the call to controller function i.e demoMethod.
document.getElementById("FileDisplay").innerHTML += "<span onclick=\"$(#control).demoMethod()\"></span>"+children[i]+"</br>";`
and demoMethod is declared inside the controller
$scope.demoMethod = function(){
console.log("it works");
}
and FileDisplay is the id of div in HTML file, how can I call this method inside from span element..?
Thank you