When an HTML is clicked, the ng-click directive tells the AngularJS script what to do. In this article, we will learn how to get many/multiple functions to the ng-click directive passed, in just one click. The key is to add a semi-colon (;) or a comma (,). All the functions must be separated by a (;) or a (, ).
Another significant difference between ng-click and onclick is the execution context. Code inside an onclick attribute executes against the global window object, while an expression inside of ng-click executes against a specific scope object, typically the scope object representing the model for the current controller.
Before fixing the problem I had an element (inside an HTML template) with a ng-click which was calling an non-existent function.
Is there a way to enable a strict mode (like use strict in JS) or something similar to see this kind of problems in the console?
UPDATE: I tried also with $compileProvider.debugInfoEnabled(true) without success
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With