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

Function withI18nSupport

packages/core/src/hydration/api.ts:313–331  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

311 * @see [I18N](guide/hydration#i18n)
312 */
313export function withI18nSupport(): Provider[] {
314 return [
315 {
316 provide: IS_I18N_HYDRATION_ENABLED,
317 useFactory: () => inject(IS_HYDRATION_DOM_REUSE_ENABLED),
318 },
319 {
320 provide: ENVIRONMENT_INITIALIZER,
321 useValue: () => {
322 if (inject(IS_HYDRATION_DOM_REUSE_ENABLED)) {
323 enableI18nHydrationRuntimeSupport();
324 setIsI18nHydrationSupportEnabled(true);
325 performanceMarkFeature('NgI18nHydration');
326 }
327 },
328 multi: true,
329 },
330 ];
331}
332
333/**
334 * Returns a set of providers required to setup support for incremental hydration.

Callers

nothing calls this directly

Calls 4

injectFunction · 0.90
performanceMarkFeatureFunction · 0.90

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…