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

Function cleanupI18nHydrationData

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

Source from the content-addressed store, hash-verified

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

Callers 1

cleanupLViewFunction · 0.90

Calls 2

cleanupDehydratedIcuDataFunction · 0.85
valuesMethod · 0.80

Tested by

no test coverage detected