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

Function printHydrationStats

packages/core/src/hydration/api.ts:129–141  ·  view source on GitHub ↗

* Outputs a message with hydration stats into a console.

(injector: Injector)

Source from the content-addressed store, hash-verified

127 * Outputs a message with hydration stats into a console.
128 */
129function printHydrationStats(injector: Injector) {
130 const console = injector.get(Console);
131 const message =
132 `Angular hydrated ${ngDevMode!.hydratedComponents} component(s) ` +
133 `and ${ngDevMode!.hydratedNodes} node(s), ` +
134 `${ngDevMode!.componentsSkippedHydration} component(s) were skipped. ` +
135 (isIncrementalHydrationEnabled(injector)
136 ? `${ngDevMode!.deferBlocksWithIncrementalHydration} defer block(s) were configured to use incremental hydration. `
137 : '') +
138 `Learn more at ${DOC_PAGE_BASE_URL}/guide/hydration.`;
139 // tslint:disable-next-line:no-console
140 console.log(message);
141}
142
143/**
144 * Returns a Promise that is resolved when an application becomes stable.

Callers 1

withDomHydrationFunction · 0.85

Calls 3

getMethod · 0.65
logMethod · 0.65

Tested by

no test coverage detected