Skip to content

Instantly share code, notes, and snippets.

@bdkosher
Created June 22, 2016 15:33
Show Gist options
  • Save bdkosher/a11686a435a3f88355eef03b541d987c to your computer and use it in GitHub Desktop.
Save bdkosher/a11686a435a3f88355eef03b541d987c to your computer and use it in GitHub Desktop.
Snippet for programmatically accessing services/factories defined in AngularJS in Chrome DevTools' console
// http://stackoverflow.com/questions/15527832/how-can-i-test-an-angularjs-service-from-the-console
angular.element(document.body).injector().get('DocumentSvc');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment