Represents an instance of a Component created via a ComponentFactory.
ComponentRef provides access to the Component Instance as well other
objects related to this Component Instance and allows you to destroy the
Component Instance via the #destroy
method.
Constructors
Properties
- changeDetectorRef → ChangeDetectorRef
-
The
ChangeDetectorRef
of the Component instance.read-only - componentType → Type
-
The component type.
read-only - hashCode → int
-
Get a hash code for this object.
read-only, inherited - hostView → ViewRef
-
The
ViewRef
of the Host View of this Component instance.read-only - injector → Injector
-
The injector on which the component instance exists.
read-only - instance → dynamic
-
The instance of the Component.
read-only - location → ElementRef
-
Location of the Host Element of this Component Instance.
read-only - runtimeType → Type
-
A representation of the runtime type of the object.
read-only, inherited
Operators
-
operator ==(
other) → bool -
The equality operator.
inherited
Methods
-
destroy(
) → void -
Destroys the component instance and all of the data structures associated with it.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a non-existent method or property is accessed.
inherited -
onDestroy(
OnDestroyCallback callback) → void -
Allows to register a callback that will be called when the component is destroyed.
-
toString(
) → String -
Returns a string representation of this object.
inherited