ComponentRef<C> class

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 ComponentRef.destroy method.

Constructors

ComponentRef(HostView<Object> _hostView, Element _nativeElement, C _component)

Properties

changeDetectorRef → HostView<Object>
The ChangeDetectorRef of the Component instance.
no setter
hashCode int
The hash code for this object.
no setterinherited
hostView → HostView<Object>
The ViewRef of the Host View of this Component instance.
no setter
injector Injector
The injector on which the component instance exists.
no setter
instance → C
The instance of the Component.
no setter
location → Element
Location of the Host Element of this Component Instance.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

destroy() → void
Destroys the component instance and all of the data structures associated with it.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onDestroy(void callback()) → void
Register a callback that will be called when the component is destroyed.
toString() String
A string representation of this object.
inherited
update(void run(C instance)) → void
Runs run to apply changes to the component instance.

Operators

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