I'm building a html block in Angular Controller to avoid the ng-repeat slowness on large data sets.
I'm trying to add a event handler ng-click="clicker()" to the html string and adding it to the dom as below.
document.getElementById("Test").innerHTML="<button ng-click='clicker()'>Click</button>";
when this element is rendered, ng-click is not working as expected - On click, no action is performed. My understanding is that Angular is not aware of this element as this point of time. In that case how do i make angular recognise it as a valid angular event?
I tried to make use if bind-as-html which didn't help.
I'm forced to choose this path due to cons with ng-repeat.
Any help is much appreciated.