Is there a way of debugging the angularjs application when it is loaded in the browser?
ie. I wish to get the $rootScope
of my current application. How woul
For those using $compileProvider.debugInfoEnabled(false);
and ng-strict-di
just paste this in the console and $rootScope
will be logged and added to window
:
function getRootScope($rootScope){ console.log(window.$rootScope = $rootScope); }
getRootScope.$inject = ["$rootScope"];
angular.element(document.querySelector('[data-ng-app],[ng-app]')).injector().invoke(getRootScope);