-
Notifications
You must be signed in to change notification settings - Fork 25.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(core): produce proper error message for unknown props on <ng-template>
s
#46068
fix(core): produce proper error message for unknown props on <ng-template>
s
#46068
Conversation
85c576d
to
c681ba5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just left a couple of nit comments, feel free to ignore.
…plate>`s Currently for cases when an unknown structural directive is applied to `<ng-template>`s, an error message thrown by the framework doesn't contain a tag name, for example: ``` NG0303: Can't bind to 'unknownDir' since it isn't a known property of 'null'. ``` The underlying reason is that the tag name for the `<ng-template>` is not produced (`null` is useed as a value) by the compiler in case of inline templates and runtime logic relies on this effect. This commit handles this situation when an error message is thrown, as the fastest way to improve the error message. More refactoring would be needed to avoid relying on the mentioned effect at runtime.
c681ba5
to
ca1f1e1
Compare
This PR was merged into the repository by commit 985f8d7. |
…plate>`s (#46068) Currently for cases when an unknown structural directive is applied to `<ng-template>`s, an error message thrown by the framework doesn't contain a tag name, for example: ``` NG0303: Can't bind to 'unknownDir' since it isn't a known property of 'null'. ``` The underlying reason is that the tag name for the `<ng-template>` is not produced (`null` is useed as a value) by the compiler in case of inline templates and runtime logic relies on this effect. This commit handles this situation when an error message is thrown, as the fastest way to improve the error message. More refactoring would be needed to avoid relying on the mentioned effect at runtime. PR Close #46068
…plate>`s (angular#46068) Currently for cases when an unknown structural directive is applied to `<ng-template>`s, an error message thrown by the framework doesn't contain a tag name, for example: ``` NG0303: Can't bind to 'unknownDir' since it isn't a known property of 'null'. ``` The underlying reason is that the tag name for the `<ng-template>` is not produced (`null` is useed as a value) by the compiler in case of inline templates and runtime logic relies on this effect. This commit handles this situation when an error message is thrown, as the fastest way to improve the error message. More refactoring would be needed to avoid relying on the mentioned effect at runtime. PR Close angular#46068
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Currently for cases when an unknown structural directive is applied to
<ng-template>
s, an error message thrown by the framework doesn't contain a tag name, for example:The underlying reason is that the tag name for the
<ng-template>
is not produced (null
is used as a value) by the compiler in case of inline templates and runtime logic relies on this effect.This commit handles this situation when an error message is thrown, as the fastest way to improve the error message. More refactoring would be needed to avoid relying on the mentioned effect at runtime.
PR Type
What kind of change does this PR introduce?
Does this PR introduce a breaking change?