Skip to content

Instantly share code, notes, and snippets.

@allenhwkim
Last active March 25, 2019 01:51
Show Gist options
  • Select an option

  • Save allenhwkim/f2e00db7cb9c86ac79addb4dcf82a0ec to your computer and use it in GitHub Desktop.

Select an option

Save allenhwkim/f2e00db7cb9c86ac79addb4dcf82a0ec to your computer and use it in GitHub Desktop.
Debugging from console
//
// https://blog.angularindepth.com/everything-you-need-to-know-about-debugging-angular-applications-d308ed8a51b4
//
ng.probe($0).triggerEventHandler('click');
ng.probe($0).parent.nativeElement
ng.probe($0).injector.get('MyService');
ng.probe($0).componentInstance.name;
ng.probe($('app-root')).injector.get(ng.coreTokens.ApplicationRef).tick(); // fire detectchanges
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment