AngularJS: Accessing provider instances via the console
Ever want to get an instance of a service for debugging purposes in the console?
To do so you can access the injector that is available on a jQuery wrapped element and then get an instance of the service you want to look at.
For example to get an instance of the $q service you can do:
q = $('body').injector().get('$q);
You can than access any of the methods available on the $q service.
Written by Joe Grund
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#Angularjs
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#