Skip to content

Instantly share code, notes, and snippets.

@MathRobin
Created December 30, 2015 14:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save MathRobin/4d896f655df2cac7c519 to your computer and use it in GitHub Desktop.
Save MathRobin/4d896f655df2cac7c519 to your computer and use it in GitHub Desktop.
Angular debug by console

Debugging AngularJS Apps from the Console

Access Scopes

angular.element(targetNode).scope();
angular.element(targetNode).isolateScope();

Grab any Services

angular.element(document.querySelector('html')).injector().get('MyService');

Access controller for directive

angular.element('my-pages').controller()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment