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

Function isClientRenderModeEnabled

packages/core/src/hydration/api.ts:176–181  ·  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

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

Callers 1

withDomHydrationFunction · 0.85

Calls 1

hasAttributeMethod · 0.80

Tested by

no test coverage detected