Skip to content

Instantly share code, notes, and snippets.

@pads
Created April 16, 2014 10:21
Show Gist options
  • Save pads/10848128 to your computer and use it in GitHub Desktop.
Save pads/10848128 to your computer and use it in GitHub Desktop.
Angular Dependency Injection - Console Access
var injector = angular.element('[data-ng-app="myAppName"]').injector();
var dependency = injector.get('myDependencyName');
dependency.doSomething();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment