ngDebug is a small library providing command line utilities to debug AngularJS-based apps in Chrome Devtools.
Install with Bower:
$ bower install --save ngDebug
-
Import ngDebug library:
<script src="bower_components/ngDebug/dist/ngDebug.js"></script>
-
Start using it!
Debug a controller/scope using css selectors :
$A.controller(selector); $A.scope(selector);
Debug a controller/scope using HTMLElements references :
$A.controller(HTMLElement); $A.scope(HTMLElement);
Debug rootScope :
$A.rootScope();
Debug scope using chrome commandLineAPI :
$A0.scope(); $A1.scope(); $A2.scope(); $A3.scope();
Debug a service by service name :
$A.service(serviceName);
Start ui-router debugging by listening to its lifecycle events :
$A.uiRouterDebug();
ngDebug is released under the MIT License.
In lieu of a formal styleguide, take care to maintain the existing coding style.
- 1.0.0
- Initial release
- 1.1.0
- added ui-router debug
######Inspired by :
- angular-console by jarrodldavis.
- the Ionic Framework Blog by @maxlynch
- Adam's answer on stackoverflow