Working with AngularJS and JS inspectors

76 views
Skip to first unread message

Andy Park

unread,
May 13, 2013, 9:11:12 PM5/13/13
to ang...@googlegroups.com
Hi,

I did a quick search and it appears there isn't anything documenting certain curiosities I had with AngularJS development when working with the Chrome or Safari web inspectors. In particular, I'd like to check the state of controllers as my app runs, and it would be lovely if I could change the model or controller state for testing / debugging purposes from my development browser. Could anyone share their experiences with the web inspector or point me to anything relevant to read up?

Thanks,
Andy

Rafael Nami

unread,
May 13, 2013, 9:56:12 PM5/13/13
to ang...@googlegroups.com
Maybe Angular Batarang is what you're searching?

Cheers

Rafael


2013/5/14 Andy Park <andy.s...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular+u...@googlegroups.com.
To post to this group, send email to ang...@googlegroups.com.
Visit this group at http://groups.google.com/group/angular?hl=en-US.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Andy Park

unread,
May 19, 2013, 5:08:52 PM5/19/13
to ang...@googlegroups.com
Thanks for recommending that tool, it's a huge boost for debugging.

I managed to find the answer I was looking for in the docs eventually, under the 'scopes' chapter.

Quote:

To examine the scope in the debugger:

right click on the element of interest in your browser and select 'inspect element'. You should see the browser debugger with the element you clicked on highlighted.

The debugger allows you to access the currently selected element in the console as $0 variable.

To retrieve the associated scope in console execute: angular.element($0).scope()

Reply all
Reply to author
Forward
0 new messages