Skip to content

fix(compiler): report unknown property bindings on explicit ng-templa…#69640

Open
aparzi wants to merge 1 commit into
angular:mainfrom
aparzi:feat-compiler-missing-import-in-template
Open

fix(compiler): report unknown property bindings on explicit ng-templa…#69640
aparzi wants to merge 1 commit into
angular:mainfrom
aparzi:feat-compiler-missing-import-in-template

Conversation

@aparzi

@aparzi aparzi commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Previously, property bindings on <ng-template> that were not claimed by a matched directive were silently ignored by the type checker. This was inconsistent with how bindings on regular elements are handled.

PR Checklist

Please check if your PR fulfills the following requirements:

PR Type

What kind of change does this PR introduce?

  • Bugfix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes
  • Documentation content changes
  • angular.dev application / infrastructure changes
  • Other... Please describe:

What is the current behavior?

Issue Number: #69322

Does this PR introduce a breaking change?

  • Yes
  • No

Templates that bind unknown properties on <ng-template> will now produce a compilation error.

@pullapprove pullapprove Bot requested a review from kirjs July 3, 2026 21:54
@angular-robot angular-robot Bot added the area: compiler Issues related to `ngc`, Angular's template compiler label Jul 3, 2026
@ngbot ngbot Bot added this to the Backlog milestone Jul 3, 2026
…te elements

Previously, property bindings on `<ng-template>` that were not claimed
by a matched directive were silently ignored by the type checker. This
was inconsistent with how bindings on regular elements are handled.

Fixes 69322
@aparzi aparzi force-pushed the feat-compiler-missing-import-in-template branch from 4b5c505 to f5a5d21 Compare July 3, 2026 21:56
@aparzi

aparzi commented Jul 3, 2026

Copy link
Copy Markdown
Contributor Author

This PR introduce a little Breaking Change. Existing code that has unused properties in directives will receive a compiler error.

@JeanMeche

Copy link
Copy Markdown
Member

Presubmit came back green. I'll have to run a TGP to see how many breakages it triggers. This will help us determine how we can land this change.

@aparzi

aparzi commented Jul 5, 2026

Copy link
Copy Markdown
Contributor Author

Presubmit came back green. I'll have to run a TGP to see how many breakages it triggers. This will help us determine how we can land this change.

Let me know how the TGP looks. I'm ready to help with any adjustments or schematics if it triggers some internal breakages. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: compiler Issues related to `ngc`, Angular's template compiler

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants