-
Notifications
You must be signed in to change notification settings - Fork 121
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
[Angular] The template context does not have an implicit value #251
Comments
Check this solution |
I don't think this is a bug. In a static analysis, the type of the context used by the embedded template ( I think an effective action we can take is to provide a more helpful diagnostic message, perhaps including a suggestion to refine the type of the context used by the |
This commit elaborates diagnostics produced for invalid template contexts by including the name of the embedded template type using the template context, and in the common case that the implicity property is being referenced (e.g. in a `for .. of ..` expression), suggesting to refine the type of the context. This suggestion is provided because users will sometimes use a base class as the type of the context in the embedded view, and a more specific context later on (e.g. in an `ngOnChanges` method). Closes angular/vscode-ng-language-service#251
This commit elaborates diagnostics produced for invalid template contexts by including the name of the embedded template type using the template context, and in the common case that the implicity property is being referenced (e.g. in a `for .. of ..` expression), suggesting to refine the type of the context. This suggestion is provided because users will sometimes use a base class as the type of the context in the embedded view, and a more specific context later on (e.g. in an `ngOnChanges` method). Closes angular/vscode-ng-language-service#251
…gs (#34751) This commit elaborates diagnostics produced for invalid template contexts by including the name of the embedded template type using the template context, and in the common case that the implicity property is being referenced (e.g. in a `for .. of ..` expression), suggesting to refine the type of the context. This suggestion is provided because users will sometimes use a base class as the type of the context in the embedded view, and a more specific context later on (e.g. in an `ngOnChanges` method). Closes angular/vscode-ng-language-service#251 PR Close #34751
…gs (angular#34751) This commit elaborates diagnostics produced for invalid template contexts by including the name of the embedded template type using the template context, and in the common case that the implicity property is being referenced (e.g. in a `for .. of ..` expression), suggesting to refine the type of the context. This suggestion is provided because users will sometimes use a base class as the type of the context in the embedded view, and a more specific context later on (e.g. in an `ngOnChanges` method). Closes angular/vscode-ng-language-service#251 PR Close angular#34751
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. |
Hi, here's an error I encounter regularly. Here is my code:
The text was updated successfully, but these errors were encountered: