In Angular.js we usually call methods from HTML code, e.g. <a ng-click="fooCtrl.bar()">foo</a>
(here using the Controller As syntax).
However no error is thrown if the bar()
method is missing from fooCtrl
. It is a source of multiple regression bugs, especially after code refactoring.
Do you know how to force Angular.js 1.3 to throw runtime errors on missing controller methods called from the view?