3 ms·
A very usefull hint I got from a MV AngularJS meetup few months ago: if you select an element in DOM inspector in Chrome, its scope will be accessible via
by vladgur 13y ago
A very usefull hint I got from a MV AngularJS meetup few months ago:
if you select an element in DOM inspector in Chrome,
its scope will be accessible via $scope in the console
Another trick that I use daily: to get a reference to some service(or anything injectable for that matter) from the console:
angular.element(document).injector().get('myService')
- fantastical 13y agoThe first trick requires having the Angular Batarang installed, right? Still cool, I didn't know about that. I've been manually typing angular.element($0).scope() like a sucker.