Développement Javascript Angular 2013 | 12 | 03

Acessing AngularJS Scope from browser console

Times to times, one needs to interact with AngularJs at runtime (for debugging purpose …).

My Teamates frequently ask me “how do I … check this directive isolated scope structure” for example …

I think the simple answer is :

  1. Select the directive’s element for inspection in your debugger.
  2. In console you can select it using chrome’s helper : $0 , which is the current selected element: