ViewRef class

An Angular view that can be created and destroyed dynamically.

A view is the fundamental building block of an Angular app. It's the smallest grouping of HTML elements that are created and destroyed together.

The properties of elements in a view can change, but their structure (order and number) can't. Changing the structure of elements can only be done by inserting, moving, or removing instances of ViewRef in a view container via ViewContainerRef. A view may contain any number of view containers.

This is the public interface which all dynamic views implement.

Implementers

Constructors

ViewRef()

Properties

destroyed bool
Whether this view has been destroyed.
read-only
hashCode int
The hash code for this object. [...]
read-only, inherited
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
onDestroy(void callback()) → void
Registers a callback to invoke when this view is destroyed.
toString() String
A string representation of this object. [...]
inherited

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited