Files
angular/goldens
Matthieu Riegler 91b8391b3d fix(compiler-cli): validate unknown element tags even when matched by attribute directives
Previously, the template type checker assumed that if any directive
matched an element node, the element itself did not need DOM schema
validation because it was assumed to be either a component or a custom
element tag like <router-outlet>.

However, if an unknown custom element tag (such as <tn-uploader>) is
only matched by attribute directives (e.g. [formControl]), the tag name
remains unclaimed and is missing its corresponding component import.
In this case, the compiler failed to emit a SCHEMA_INVALID_ELEMENT
diagnostic.

This commit updates the element validation condition in the type checker
to verify the element tag name against the DOM schema unless the element
matches an Angular component or a directive whose selector explicitly
matches the tag name.

By default this check will be disabled to prevent a breaking change in v22.3.
You can enable it with `strictUnknownElementWithDirectives: true`.

In v23 `strictUnknownElementWithDirectives` will be enabled by default.

Related to #46351
2026-09-29 12:31:31 -07:00
..
2025-11-06 10:03:05 -08:00

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