4 ms·
onClick will be evaluated within the global scope, ng-click is evaluated within the scope of the controller. That's a pretty substantial difference. Your HTML
by davej 14y ago
onClick will be evaluated within the global scope, ng-click is evaluated within the scope of the controller. That's a pretty substantial difference.
Your HTML has to be hooked up to your controller somehow, I personally prefer angular's declarative approach rather than a big messy init method.