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

Function withIncrementalHydration

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

Source from the content-addressed store, hash-verified

340 * Intent to remove in v24.
341 */
342export function withIncrementalHydration(): Provider[] {
343 const providers: Provider[] = [
344 withEventReplay(),
345 {
346 provide: IS_INCREMENTAL_HYDRATION_ENABLED,
347 useValue: true,
348 },
349 {
350 provide: DEHYDRATED_BLOCK_REGISTRY,
351 useFactory: createDehydratedBlockRegistry,
352 },
353 ];
354
355 if (typeof ngServerMode === 'undefined' || !ngServerMode) {
356 providers.push({
357 provide: APP_BOOTSTRAP_LISTENER,
358 useFactory: () => {
359 const injector = inject(Injector);
360 const doc = inject(DOCUMENT);
361
362 return () => {
363 // No-op when the incremental-hydration runtime has not been
364 // activated. When activated, performs defer-block scanning,
365 // trigger initialization, and jsaction wiring.
366 runIncrementalHydrationBootstrap(injector, doc);
367 };
368 },
369 multi: true,
370 });
371 }
372
373 return providers;
374}
375
376/**
377 *

Callers

nothing calls this directly

Calls 4

withEventReplayFunction · 0.90
injectFunction · 0.90
pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…