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

Function isDisconnectedNode

packages/core/src/hydration/utils.ts:509–516  ·  view source on GitHub ↗
(hydrationInfo: DehydratedView, index: number)

Source from the content-addressed store, hash-verified

507 * such nodes and instead, use a regular "creation mode".
508 */
509export function isDisconnectedNode(hydrationInfo: DehydratedView, index: number): boolean {
510 // Check if we are processing disconnected info for the first time.
511 if (typeof hydrationInfo.disconnectedNodes === 'undefined') {
512 const nodeIds = hydrationInfo.data[DISCONNECTED_NODES];
513 hydrationInfo.disconnectedNodes = nodeIds ? new Set(nodeIds) : null;
514 }
515 return !!initDisconnectedNodes(hydrationInfo)?.has(index);
516}
517
518/**
519 * Checks whether a node can be hydrated.

Callers 4

locateOrCreateNodeImplFunction · 0.90
canHydrateNodeFunction · 0.70

Calls 2

initDisconnectedNodesFunction · 0.85
hasMethod · 0.65

Tested by

no test coverage detected