Files
angular__angular/aio/content/extended-diagnostics/NG8108.md

29 lines
835 B
Markdown

@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).
<code-example format="html" language="html">
&lt;my-cmp ngSkipHydration /&gt;
&lt;!-- or --&gt;
&lt;my-cmp ngSkipHydration="true" /&gt;
</code-example>
See [extended diagnostic configuration](extended-diagnostics#configuration) for more info.
<!-- links -->
<!-- external links -->
<!-- end links -->
@reviewed 2023-03-21