GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||
GeezerVison is showing github.com — fix(compiler): report unclaimed property bindings on ng-template by tso1158687 · Pull Request #70345 · angular/angular ConversationPR Checklist
PR Type
What is the current behavior?Property bindings on a literal @Directive({selector: 'ng-template[auiTypedOption]'}) export class TypedOptionDirective { auiTypedOption = input.required<any>(); } @Component({imports: [], template: `<ng-template [auiTypedOption]="searchResult()"></ng-template>`}) export class TestComponent {} compiles silently and only fails at runtime with Issue Number: #69322 What is the new behavior?A literal The shared fixture in Does this PR introduce a breaking change?
Other informationTemplates that previously compiled with an unclaimed binding on Verified locally with 🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsProperty bindings on a literal <ng-template> element that were not claimed by any directive were never checked against the DOM schema during template type checking, so forgetting to import the directive compiled silently and only failed at runtime with NG0303. Treat a literal <ng-template> the same way as a regular element for the purpose of unclaimed inputs, so a missing import is reported as NG8002 at build time. Synthetic template nodes generated for structural directive shorthand are not affected, since their bindings are checked on the wrapped element.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesNo one assignedLabels
area: compiler
ProjectsDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later. | ||
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |