-
-
Notifications
You must be signed in to change notification settings - Fork 204
Broken template typings #1616
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
Comments
is it a duplicate of ? #1590 |
@eneajaho what is messing up my IDE then? :D |
Can you try in vscode to see if the issue is the IDE. |
On my end, I never get any variable inference in the template, but it's also not working with ngFor. I compared inline HTML and separated file but same issue, not sure why. 😄 |
Just a small note. Example from Julian I assume is not with observable. Example from Enea is. 🧐 I also remember stumbling upon this issue with non-observable values, but wasn't focusing on that before. |
2023.3 EAP from Webstorm got pushed out with some type inferring fixes in their changelog maybe this could fix it, i dont have any problems in webstorm though and im using |
Can you give it a try in vscode? Maybe that's an issue with Webstorm ? |
is it broken for you as well @kkachniarz220 ? |
yes |
I honestly think that this is a problem with Webstorms own language service for angular, currently im on NeoVim and im using the Angular LSP with the Language-Server and Service on 17.1.0 and it shows me the correct types. there are plenty of problems with their own integration of it if you look into their webstorm issue tracker. |
Maybe a upgrade to 2024 EAP would resolve your problem. If you take a look into the changelog of the 2024 EAP newest update you'll find this: I've also checked in my 2024 EAP Version and it inferres the type correctly |
Multiple users reported the issue that their IDE cannot infer the typings from our structural directives due to the `inject` method. Using the constructor based injection solves that issue
fix(template): use constructor injection for templateRef. fixes #1616
Description
I think this commit broke our template type support. Before, the types were properly inferred by whatever observable I've provided. I think it has something todo with the way how the
TemplateRef
is injected into the component. From what I know it has to be part of the constructor.@edbzn @eneajaho any idea?
The text was updated successfully, but these errors were encountered: