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

Function isClientRenderModeEnabled

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

* Checks whether the `RenderMode.Client` was defined for the current route.

(doc: Document)

Source from the content-addressed store, hash-verified

175 * Checks whether the `RenderMode.Client` was defined for the current route.
176 */
177function isClientRenderModeEnabled(doc: Document): boolean {
178 return (
179 (typeof ngServerMode === 'undefined' || !ngServerMode) &&
180 doc.body.hasAttribute(CLIENT_RENDER_MODE_FLAG)
181 );
182}
183
184/**
185 * Returns a set of providers required to setup hydration support

Callers 1

withDomHydrationFunction · 0.85

Calls 1

hasAttributeMethod · 0.65

Tested by

no test coverage detected