~/talk

Clean Up Your Dom By Using The Full Power Of Angular Host Elements

Talkat Angularday 2023 · on Friday, 2023-11-24· [angular]
slides:none on file

Claims that Angular DOM bloat drops by removing wrapper elements and moving behavior onto the host element, demonstrated with concrete patterns: host bindings (classes, CSS variables, Tailwind), @HostListeners for events, host directives to attach standalone directives and forward inputs/outputs, attribute/component selectors to enhance native elements, and control-flow alternatives using ng-container or display:contents (with the caveat that display:contents makes the element disappear). Examples show these techniques working and note limits around structural directives and CSS/encapsulation tradeoffs.

AI-written summary · about

  1. 0:00Angular host elements
  2. 2:07Introduction
  3. 4:55Excessive DOM nesting problems
  4. 7:05Host bindings for attributes
  5. 9:54Host selector and stylesheets
  6. 12:47Host event bindings
  7. 14:33Host directives for logic
  8. 17:02Host properties in directives
  9. 19:50Components with attribute selectors
  10. 21:59Structural directives and host elements
  11. 23:31Clean DOM with display contents
  12. 24:37Angular host element wish list
  13. 27:08Host element techniques summary
  14. 27:56Q&A
~/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.