~/talk

Timely matter: when does Angular execute your code?

Talkat NG-BE 2023 · 2023-03-23..03-24· [angular, frontend-architecture]
slides:none on file

Live demo code shows exact execution order using a custom logger and real routes and resolvers: ngOnChanges before ngOnInit when components have inputs, constructors and injected services run before lifecycle hooks, and nested guards hoisted before parent resolvers can reorder expected guard/resolver sequences. The talk proves APP_INITIALIZER runs before bootstrap component and platform initializers run even earlier. A built beforeunload handler works but breaks bfcache in some browsers, so early initialization increases startup latency and must be balanced against performance.

AI-written summary · about

  1. 0:00Introduction
  2. 1:03Talk overview
  3. 2:48Real-world use case
  4. 3:51Lifecycle hooks
  5. 6:44Code before lifecycle hooks
  6. 8:29Code before instantiation
  7. 11:18Injection tokens for early execution
  8. 13:48Platform initializer
  9. 15:58Code after user interaction
  10. 17:20Page unload events
  11. 19:07Key takeaways
  12. 20:12Closing remarks
~/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.