Chrome extension hint.js & ngHintModules
Solution 1:
I also had this problem which was resolved by disabling Batarang.
Solution 2:
This issue is opened on the Batarang Github here: https://github.com/angular/angularjs-batarang/issues/156
You can load the prior version of Batarang from this zip file: https://github.com/angular/angularjs-batarang/archive/v0.4.3.zip
- Open More Tools->Extensions in Chrome
- Locate AngularJS Batarang and click on the trash can to remove the extension
- Download the .zip
- Extract the file
- Open More Tools->Extensions in Chrome
- Check Developer Mode at the top
- Click 'Load unpacked extension'
- Select the directory where you extracted the zip
- If you get an error about the manifest file, then you probably selected one directory level too high. Make sure that you select the bottom level angularjs-batarang-0.4.3 directory
- Load up an AngularJS page and use Batarang again with Inspector just like before
This will restore the previous version which while having issues does have some mostly working features like Performance profiling, scope inspector, options, and a help tab which are gone from the latest version. The 0.7.1 version fixes the major breakage of apps, but it only provides the scope tree (no inspector) and the new angular-hint functionality.
Solution 3:
You don't need to disable Angular batarang; just do the following:
- Open the developer tools and navigate to the hint.js file (the one that is triggering the stack overflow)
- Go to line 453 add add a breakpoint
- reload the app, and when it hits the breakpoint just comment it out (setupModuleLoader(window)) and click continue
- It will still throw an exception, (Uncaught ReferenceError: angular is not defined) but you will be able to run batarang
I know it's not the best solution, but that's the quickest thing I could find without going too deep into the problem
Update:
Checking more to what is happening I noticed that the problem happens when we have define multiple modules and we are adding the same dependencies for all of them.
for example:
angular.module("app", ["moduleB", "moduleC"]);
angular.module("moduleB", ["moduleC"]);
When I define the moduleB without passing the same deps with it's parent module, then there is no stack overflow.
angular.module("moduleB", []);