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

Function canHydrateNode

packages/core/src/hydration/utils.ts:523–532  ·  view source on GitHub ↗
(lView: LView, tNode: TNode)

Source from the content-addressed store, hash-verified

521 * @param tNode Node to be checked.
522 */
523export function canHydrateNode(lView: LView, tNode: TNode): boolean {
524 const hydrationInfo = lView[HYDRATION];
525
526 return (
527 hydrationInfo !== null &&
528 !isInSkipHydrationBlock() &&
529 !isDetachedByI18n(tNode) &&
530 !isDisconnectedNode(hydrationInfo, tNode.index - HEADER_OFFSET)
531 );
532}
533
534/**
535 * Helper function to prepare text nodes for serialization by ensuring

Calls 3

isInSkipHydrationBlockFunction · 0.90
isDetachedByI18nFunction · 0.90
isDisconnectedNodeFunction · 0.70

Tested by

no test coverage detected