~/talk

The differences between ElementRef, TemplateRef, ViewContainerRef

Talkat Angular Connect 2018 · on Thursday, 2018-11-08· [angular]

Explains when ElementRef vs TemplateRef vs ViewContainerRef actually produce DOM nodes and how to instantiate views and components at runtime using the createEmbeddedView and createComponent APIs; shows practical use of NgTemplateOutlet and NgComponentOutlet, the structural directive micro‑syntax that wraps elements in ng‑template, and how inserted views render as siblings anchored by comment nodes; demos Angular Elements and using the Renderer service for platform‑agnostic DOM access and clears common debugging confusions so the examples are reproducible.

AI-written summary · about

  1. 0:00Intro
  2. 0:27Title
  3. 0:57Why
  4. 3:07Confusion
  5. 4:28ElementRef
  6. 6:21View
  7. 8:44Containers
  8. 13:18Accessing ElementRef
  9. 15:19Debugging ViewContainerRef
  10. 17:43TemplateRef
  11. 20:20Create Embedded View
  12. 21:15Instantiate Embedded View
  13. 25:57Structural Directives
  14. 28:42Context
  15. 30:00Conclusion
~/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.