Upgrade to Pro — share decks privately, control downloads, hide ads and more …

What's Angular View?

What's Angular View?

Siwat Kaolueng

March 30, 2021
Tweet

More Decks by Siwat Kaolueng

Other Decks in Technology

Transcript

  1. The Last Guide For Angular Change Detection You'll Ever Need

    - Mokkapps (Michael Hoffmann) - Senior Freelance Fullstack Developer
  2. View The smallest grouping of display elements that can be

    created and destroyed together - Angular Document Angular data structure holding DOM elements - Me
  3. ChangeDetectorRef — Base class for Angular Views, provides change detection

    functionality. This class provides various methods related to change detection. ViewRef — Represents an Angular view specifically the host view defined by a component. This class extends the ChangeDetectorRef. Other than the methods inherited from the parent class it provides the method related to component/component view. EmbeddedViewRef — Represents an Angular view in a view container. An embedded view can be referenced from a component other than the hosting component whose template defines it, or it can be defined independently by a TemplateRef. ViewContainerRef — Represents a container where one or more views can be attached to a component. It can contain host views (created by instantiating a component with the createComponent() method), and embedded views (created by instantiating a TemplateRef with the createEmbeddedView() method).
  4. ViewContainerRef An element (container) where you can put component or

    view as a sibling to this element https://stackblitz.com/edit/angular-ivy-nlp63b