MCPcopy Index your code
hub / github.com/angular/angular / cleanupDehydratedViews

Function cleanupDehydratedViews

packages/core/src/hydration/cleanup.ts:129–145  ·  view source on GitHub ↗
(appRef: ApplicationRef)

Source from the content-addressed store, hash-verified

127 * all dehydrated views from all `LContainer`s along the way.
128 */
129export function cleanupDehydratedViews(appRef: ApplicationRef) {
130 const viewRefs = appRef._views;
131 for (const viewRef of viewRefs) {
132 const lNode = getLNodeForHydration(viewRef);
133 // An `lView` might be `null` if a `ViewRef` represents
134 // an embedded view (not a component view).
135 if (lNode !== null && lNode[HOST] !== null) {
136 if (isLView(lNode)) {
137 cleanupLView(lNode);
138 } else {
139 // Cleanup in all views within this view container
140 cleanupLContainer(lNode);
141 }
142 ngDevMode && ngDevMode.dehydratedViewsCleanupRuns++;
143 }
144 }
145}
146
147/**
148 * post hydration cleanup handling for defer blocks that were incrementally

Callers 2

withDomHydrationFunction · 0.90

Calls 4

getLNodeForHydrationFunction · 0.90
isLViewFunction · 0.90
cleanupLViewFunction · 0.85
cleanupLContainerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…