~/talk

ngTemplateOutlet: The secret to customisation

Talkat AngularConnect 2019 · 2019-09-19..09-20· [angular, component-design]
slides:none on file

Demonstrates using TemplateRefs with ngTemplateOutlet (and ngTemplateOutletContext) so a parent passes a template and the component hydrates it with its internal state via ContentChild, replacing many fragile inputs. Builds a reusable select component that renders different visuals (sharks, tractors) from client templates, keeps a huge icon library out of the bundle, falls back to a default template, simplifies testing, and results in a single generic component that actually works and improves performance.

AI-written summary · about

  1. 0:00Intro
  2. 2:15Talk Outline • Reconstruction
  3. 4:11Client 2: Latin Names
  4. 4:50Client 1: Swim Icon
  5. 8:20What do we need?
  6. 8:53What is a Template and Template Outlet?
  7. 9:49Templates and Template Outlets
  8. 10:161. Pass generic template into a component
  9. 10:582. Component to hydrate template with it's state
  10. 12:51Final Selector Component
  11. 13:26Final Selector Template
  12. 13:52Final Client Code
  13. 15:12Two dients sharing a single component
  14. 16:17Default Template
  15. 17:18Multiple Templates
  16. 18:27Context Properties (let-*)
  17. 19:59Testing Ng TemplateOutlets
~/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.