Created
July 8, 2014 13:25
-
-
Save mgibowski/e7531a3635655ecd0725 to your computer and use it in GitHub Desktop.
snippets for inspecting angularjs from browser console
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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