angular/aio/content/extended-diagnostics/NG8108.md
Matthieu Riegler 03d1d00ad9 feat(compiler-cli): Add an extended diagnostic for nSkipHydration (#49512)
This diagnostic ensures that the special attribute `ngSkipHydration` is not a binding and has no other value than `"true"` or an empty value.

Fixes #49501

PR Close #49512
2023-03-23 13:54:03 -07:00

835 B

@name ngSkipHydration should be a static attribute

@description

The ngSkipHydration is a special attribute that indicates to Angular that a particular component should be opted-out of hydration. This diagnostic ensures that this attribute ngSkipHydration is set statically and the value is either set to "true" or an empty value.

What should I do instead?

When using the ngSkipHydration, ensure that it's set as a static attribute (i.e. you do not use the Angular template binding syntax).

<my-cmp ngSkipHydration /> <!-- or --> <my-cmp ngSkipHydration="true" />

See extended diagnostic configuration for more info.

@reviewed 2023-03-21