~/talk

Debugging Like a Boss in Angular 9

Talkat ng-conf 2020: Hardwired · 2020-04-01..04-03· [angular]
links:none on file
slides:none on file

Angular 9 exposes a console debugging API that surfaces component instances, directives, listeners and context so you can inspect and mutate live state: use ng.getComponent or ng.getOwningComponent to grab an instance, change a property and run ng.applyChanges to force change detection; use ng.getDirectives and ng.getListeners to inspect third‑party directives or call listener callbacks manually. Examples include diagnosing an ngFor where the array content changes but indices don’t, and altering a bootstrap directive’s orientation in the console; API is usable now but marked work‑in‑progress.

AI-written summary · about

  1. 0:00Start
  2. 6:02Get Angular Elements
  3. 6:13ng.getComponent
  4. 8:17ng.applyChanges
  5. 9:09ng.getOwning Component
  6. 9:56Other Methods
  7. 11:33Note from the Angular Team
  8. 20:35Next Steps
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.