Home > Software engineering >  How to enable ng global object in devtools console?
How to enable ng global object in devtools console?

Time:12-27

i would like to use the ng object in the devtools console in my browser, so how can i enable it so i can debug and check component data?

For example i would like to target and check some component with ng.getComponent($0) but at the moment when i run my application locally and if i try that in my chrome console i get error:

Uncaught ReferenceError: ng is not defined

enter image description here

This is the angular version that im using but i dont know if it has to do something with it, i hope it wasnt removed with the newer versions of android.

CodePudding user response:

You could install Angular DevTools extension in Chrome - very useful for this sort of debugging, and gives you the same ( more advanced) ng commands in the console

  • Related