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

Function detachViewFromDOM

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

Source from the content-addressed store, hash-verified

236 * @param lView the `LView` to be detached.
237 */
238export function detachViewFromDOM(tView: TView, lView: LView) {
239 // When we remove a view from the DOM, we need to rerun afterRender hooks
240 // We don't necessarily needs to run change detection. DOM removal only requires
241 // change detection if animations are enabled (this notification is handled by animations).
242 lView[ENVIRONMENT].changeDetectionScheduler?.notify(NotificationSource.ViewDetachedFromDOM);
243 applyView(tView, lView, lView[RENDERER], WalkTNodeTreeAction.Detach, null, null);
244}
245
246/**
247 * 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