In Angular 1, you could get the injector via the console, which allowed you to then get any service:
angular.element(document.querySelector('html')).injector().get('MyService')
This was extremely useful for debugging. What's the equivalent in NG2?
You can use ng.probe($0)
in the console to get debug information about your Angular2 application.
See also how to access Angular2 component specific data in console?
But that is not available when enableProdMode()
was called (only for debuggin)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With