Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Get angularjs controller in page print in console
var controllers= document.querySelectorAll('[data-ng-controller]');
for(var j=0; j < document.querySelectorAll('[data-ng-controller]').length; j++){
var controllerName = controllers[j].getAttribute("data-ng-controller");
console.group("controller-"+(j+1));
console.log(controllerName);
console.groupEnd("controller");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.