◐ Shell
clean mode source ↗

ViewRef • Angular

Destroys this view and all of the data structures associated with it.

@returnsvoid

Reports whether this view has been destroyed.

A lifecycle hook that provides additional developer-defined cleanup functionality for views.

@paramcallbackFunction

A handler function that cleans up developer-defined data associated with a view. Called when the destroy() method is invoked.

@returnsvoid

When a view uses the ChangeDetectionStrategy#OnPush (checkOnce) change detection strategy, explicitly marks the view as changed so that it can be checked again.

Components are normally marked as dirty (in need of rerendering) when inputs have changed or events have fired in the view. Call this method to ensure that a component is checked even if these triggers have not occurred.

@returnsvoid

Detaches this view from the change-detection tree. A detached view is not checked until it is reattached. Use in combination with detectChanges() to implement local change detection checks.

Detached views are not checked during change detection runs until they are re-attached, even if they are marked as dirty.

@returnsvoid

Checks this view and its children. Use in combination with ChangeDetectorRef#detach to implement local change detection checks.

@returnsvoid

Re-attaches the previously detached view to the change detection tree. Views are attached to the tree by default.

@returnsvoid