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

Function findMatchingDehydratedViewImpl

packages/core/src/hydration/views.ts:90–104  ·  view source on GitHub ↗

* Retrieves the next dehydrated view from the LContainer and verifies that * it matches a given template id (from the TView that was used to create this * instance of a view). If the id doesn't match, that means that we are in an * unexpected state and can not complete the reconciliation process.

(
  lContainer: LContainer,
  template: string | null,
)

Source from the content-addressed store, hash-verified

88 * in this container.
89 */
90function findMatchingDehydratedViewImpl(
91 lContainer: LContainer,
92 template: string | null,
93): DehydratedContainerView | null {
94 if (hasMatchingDehydratedView(lContainer, template)) {
95 return lContainer[DEHYDRATED_VIEWS]!.shift()!;
96 } else {
97 // Otherwise, we are at the state when reconciliation can not be completed,
98 // thus we remove all dehydrated views within this container (remove them
99 // from internal data structures as well as delete associated elements from
100 // the DOM tree).
101 removeDehydratedViews(lContainer);
102 return null;
103 }
104}
105
106export function findMatchingDehydratedView(
107 lContainer: LContainer,

Callers

nothing calls this directly

Calls 2

removeDehydratedViewsFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…