Jrod Blog

Programming, System Administration, and everything else.

Wednesday, February 19, 2014

Access your AngularJS services with a handy JS console script

angular.element(document)
       .injector()
       .invoke(function($window, Todos, Account) {

  $window.MyNS = {
    Todos: Todos,
    Account: Account
  }
});


Now you have access to MyNS.Todos and MyNS.Account in the console!
Posted by Jeff Rodriguez at 3:40 PM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2015 (3)
    • ►  September (2)
    • ►  August (1)
  • ▼  2014 (5)
    • ►  May (1)
    • ►  March (1)
    • ▼  February (3)
      • The Handiest GitHub Trick I know: ?w=no
      • Access your AngularJS services with a handy JS con...
      • Magento 403 Forbidden at /.html
  • ►  2013 (9)
    • ►  December (1)
    • ►  October (1)
    • ►  August (2)
    • ►  May (1)
    • ►  April (1)
    • ►  February (2)
    • ►  January (1)
  • ►  2012 (3)
    • ►  October (2)
    • ►  February (1)
  • ►  2011 (9)
    • ►  November (2)
    • ►  July (1)
    • ►  June (1)
    • ►  May (1)
    • ►  March (3)
    • ►  January (1)
  • ►  2010 (4)
    • ►  June (1)
    • ►  April (1)
    • ►  March (1)
    • ►  January (1)
  • ►  2009 (3)
    • ►  December (1)
    • ►  October (1)
    • ►  September (1)
  • ►  2008 (3)
    • ►  December (1)
    • ►  August (1)
    • ►  March (1)

About Me

Jeff Rodriguez
View my complete profile
Simple theme. Powered by Blogger.