NG.IX · Angular 22 practice question

A team enables hydration on an SSR app that embeds a third-party charting widget performing direct DOM manipulation. Given this template, why did the developer add ngSkipHydration?

<app-legacy-chart ngSkipHydration />
Choose one answer
Check answer and explanation

Correct answer: To exempt that component from hydration when direct DOM manipulation cannot yet be replaced with Angular constructs.

Explanation

Direct DOM manipulation breaks hydration unless it is rewritten using Angular constructs or bypassed with ngSkipHydration on the affected component.

Common trap

Thinking ngSkipHydration prevents server rendering is a frequent mix-up, because the attribute only skips client-side hydration for that component rather than disabling SSR. Treating ngSkipHydration as a lazy-loading trigger is tempting due to its name, yet bundle deferral is handled by @defer blocks rather than ngSkipHydration.

Source: Angular docs: Hydration — Verify that hydration is enabled
Checked against the cited text on 2026-11-25.

Report an error in this question