mirror of
https://github.com/angular/angular.git
synced 2026-11-22 22:55:25 -05:00
Given this template:
```html
<main>
<span>{{ value }}</span>
</main>
```
During hydration, Angular looks for the text node that the server rendered
inside the `<span>`. If the HTML from the server was changed and this text
node is missing, dev mode throws a clear NG0500 error. But this check only
runs in dev mode.
Prior to this fix, production continued with the missing text node and failed
on the first update of that binding with a raw error that doesn't say what
went wrong:
```
TypeError: Cannot set properties of null (setting 'nodeValue')
```
With this fix, production throws NG0512 during hydration instead.
Note that static text behaves differently. Nothing ever updates it, so it
hydrated without an error before this fix and left a gap in the DOM. It now
throws as well.
(cherry picked from commit 2a450cbfaa)
public-api/
This directory contains all of the public api goldens for our npm packages we publish to NPM. These are tested on all PRs and commits as part of our bazel tests.
To check or update the public api goldens, run one of the following commands:
pnpm public-api:check
pnpm public-api:update