~/talk

Run Code When Leaving Your Angular Application

Talkat ng-conf 2022 · 2022-08-31..09-02· [angular, web-platform]
links:none on file
slides:none on file

Claims that ngOnDestroy not fired on refresh or tab close, demonstrates that Angular doesn’t destroy components on browser refresh so the lifecycle hook is skipped, and shows a working fix: add a @HostListener('window:beforeunload', ['$event']) method that logs the event. The demo runs in the browser, the console shows the beforeunload handler firing, and the talk gives concrete uses like clearing local/session storage or logging users out which are proved to work.

AI-written summary · about

~/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.