ComponentRef
Represents a component created by a ComponentFactory.
Provides access to the component instance and related objects,
and provides the means of destroying the instance.
setInput
voidUpdates a specified input name to a new value. Using this method will properly mark for check
component using the OnPush change detection strategy. It will also assure that the
OnChanges lifecycle hook runs when a dynamically created component is change-detected.
stringThe name of an input.
unknownThe new value of an input.
voidlocation
ElementRef<any>The host or anchor element for this component instance.
injector
InjectorThe dependency injector for this component instance.
instance
CThis component instance.
hostView
ViewRefThe host view defined by the template for this component instance.
changeDetectorRef
ChangeDetectorRefThe change detector for this component instance.
componentType
Type<any>The type of this component (as created by a ComponentFactory class).
destroy
voidDestroys the component instance and all of the data structures associated with it.
voidonDestroy
voidA lifecycle hook that provides additional developer-defined cleanup functionality for the component.
FunctionA handler function that cleans up developer-defined data
associated with this component. Called when the destroy() method is invoked.
void