javascript - AngularJS ng-click inside innerHTML -
i have code below:
acrosstext = acrosstext + activewordlist[w].placeorder + ". " + activewordlist[w].clue + "<button ng-click='speak()'>speak</button> " + "<br /><br />"; document.getelementbyid('div1').innerhtml = acrosstext;
however ng-click="speak()" inside innerhtml not firing. what's wrong?
the code not being compiled. must compile using $compile
.
Comments
Post a Comment