arturovt 2a450cbfaa fix(core): throw NG0512 instead of TypeError when hydration text node is missing
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.
2026-11-16 14:12:24 -08:00
…
…
…
2026-11-10 09:33:44 -08:00
…
…
2026-10-28 11:40:51 -07:00

Angular - The modern web developer's platform

angular-logo
Angular is a development platform for building mobile and desktop web applications
using TypeScript/JavaScript and other languages.

angular.dev

Contributing Guidelines · Submit an Issue · Blog

Angular on npm


Documentation

Get started with Angular, learn the fundamentals and explore advanced topics on our documentation website.

Advanced

Local Development

To contribute to the Angular Docs, check out the Angular.dev README

Development Setup

Prerequisites

Setting Up a Project

Install the Angular CLI globally:

npm install -g @angular/cli

Create a workspace:

ng new [PROJECT NAME]

Run the application:

cd [PROJECT NAME]
ng serve

Angular is cross-platform, fast, scalable, has incredible tooling, and is loved by millions.

Quickstart

Get started in 5 minutes.

Ecosystem

angular ecosystem logos

Changelog

Learn about the latest improvements.

Upgrading

Check out our upgrade guide to find out the best way to upgrade your project.

Contributing

Contributing Guidelines

Read through our contributing guidelines to learn about our submission process, coding rules, and more.

Want to Help?

Want to report a bug, contribute some code, or improve the documentation? Excellent! Read up on our guidelines for contributing and then check out one of our issues labeled as help wanted or good first issue.

Code of Conduct

Help us keep Angular open and inclusive. Please read and follow our Code of Conduct.

Community

Join the conversation and help the community.

Love Angular badge

Love Angular? Give our repo a star ⭐ ⬆️.

Languages
TypeScript 73.1%
JavaScript 15.7%
Rust 6.6%
HTML 1.6%
Starlark 1.6%
Other 1.4%