3 ms·
The difference is onclick="doSomething()" runs doSomething() in the global scope. Not good! ng-click="doSomething()" runs doSomething() in the scope of the con
by pjstarifa 14y ago
The difference is onclick="doSomething()" runs doSomething() in the global scope. Not good!
ng-click="doSomething()" runs doSomething() in the scope of the controller that contains the element. Good!