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

Function cleanupI18nHydrationData

packages/core/src/hydration/i18n.ts:651–665  ·  view source on GitHub ↗
(lView: LView)

Source from the content-addressed store, hash-verified

649 * Clean up all i18n hydration data associated with the given view.
650 */
651export function cleanupI18nHydrationData(lView: LView) {
652 const hydrationInfo = lView[HYDRATION];
653 if (hydrationInfo) {
654 const {i18nNodes, dehydratedIcuData: dehydratedIcuDataMap} = hydrationInfo;
655 if (i18nNodes && dehydratedIcuDataMap) {
656 const renderer = lView[RENDERER];
657 for (const dehydratedIcuData of dehydratedIcuDataMap.values()) {
658 cleanupDehydratedIcuData(renderer, i18nNodes, dehydratedIcuData);
659 }
660 }
661
662 hydrationInfo.i18nNodes = undefined;
663 hydrationInfo.dehydratedIcuData = undefined;
664 }
665}
666
667function cleanupDehydratedIcuData(
668 renderer: Renderer,

Callers 1

cleanupLViewFunction · 0.90

Calls 2

cleanupDehydratedIcuDataFunction · 0.85
valuesMethod · 0.80

Tested by

no test coverage detected