MCPcopy Create free account
hub / github.com/angular/angular / detachViewFromDOM

Function detachViewFromDOM

packages/core/src/render3/node_manipulation.ts:236–242  ·  view source on GitHub ↗
(tView: TView, lView: LView)

Source from the content-addressed store, hash-verified

234 * @param lView the `LView` to be detached.
235 */
236export function detachViewFromDOM(tView: TView, lView: LView) {
237 // When we remove a view from the DOM, we need to rerun afterRender hooks
238 // We don't necessarily needs to run change detection. DOM removal only requires
239 // change detection if animations are enabled (this notification is handled by animations).
240 lView[ENVIRONMENT].changeDetectionScheduler?.notify(NotificationSource.ViewDetachedFromDOM);
241 applyView(tView, lView, lView[RENDERER], WalkTNodeTreeAction.Detach, null, null);
242}
243
244/**
245 * Traverses down and up the tree of views and containers to remove listeners and

Callers 2

detachFromAppRefMethod · 0.90
removeViewFromDOMFunction · 0.85

Calls 2

applyViewFunction · 0.85
notifyMethod · 0.65

Tested by

no test coverage detected