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

Function printHydrationStats

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

* Outputs a message with hydration stats into a console.

(injector: Injector)

Source from the content-addressed store, hash-verified

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