I'm using the angular-cli system to build an angular app. During debugging with ng serve
I find my self using the developer tools to manipulate and check variables.
The problem is that I'm constantly running the same js script, to find the angular component on the page and then getting the component instance etc...
var element = document.getElementsByTagName("my-app-component")[0];
var comp = ng.probe(element).componentInstance;
var myService = comp.myService;
Can I insert this script into the development environment settings somehow?
ng serve --target=development --environment=dev
I'm unsure from the documentation, on how to do this.
$a
in dev tools with it...