There is clearly something fundamental im not yet understanding.
Im trying to make user of the Modal module in Angular Ui.Bootstrap but im finding that my clicks are not activating the open()
function -- So boiling it down to a very simple testcase, as below, im not seeing any calls when the ng-click points to a function (alert or console.log), but does work when the ng-click points to something which is just an expression
Why is the alert
not called in the first example?
<div data-ng-app>
<button data-ng-click="alert('Message 1');">
ngClick -- not working, why not?
</button>
<button onclick="alert('Message 2');">
Plain onclick
</button>
<button data-ng-click="count = (count + 1)">
But this works, why ???
</button>
count: {{count}}
</div>