Skip to content

Instantly share code, notes, and snippets.

@mgibowski
Created July 8, 2014 13:25
Show Gist options
  • Save mgibowski/e7531a3635655ecd0725 to your computer and use it in GitHub Desktop.
Save mgibowski/e7531a3635655ecd0725 to your computer and use it in GitHub Desktop.
snippets for inspecting angularjs from browser console
// getting scopes of elements:
angular.element(targetNode).scope()
angular.element(targetNode).isolateScope()
// injecting services:
angular.element('html').injector().get('MyService')
// accessing 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