Repository navigation
fix(common): add generics to NgIf declaration - #25983
piotrtomiak wants to merge 1 commit into
Conversation
4b9d007 to
00d74b7
Compare
|
I'd suggest:
Also I'm not sure whether this could help language service, or even the compiler, as type-checking for |
0f43067 to
b1a59ec
Compare
This change allows IDE to analyze type of the variable in ngIf context.
b1a59ec to
16f08b3
Compare
|
@trotyl - thanks for suggestions, I've applied them. Webstorm only partially uses language services and on our side we have just implemented support for proper type evaluation of |
|
Is there anything more I should change for the PR to be accepted? |
|
Any plans to include this PR? |
|
I'm not sure about whether Angular team is scheduling this, but from other discussions, excluding |
|
I've managed to solve this issue differently. |
|
Funny how a developer from jetbrains tried to contribute so every editor benefits. But had to give up because of no response and baked it directly into intellij. I love angular but this is just heart breaking. |
|
This would be a nice to have feat. |
|
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. |
This change allows IDE to analyze type of the variable in ngIf context.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
The issue has been originally filed with Webstorm - https://youtrack.jetbrains.com/issue/WEB-31760 .
In the following example code (
login$: Observable<Login>):logintype is detected asanyand no content assist is available for the variable fields.What is the new behavior?
It will be possible to provide content assist by IDE on the
loginfields, similarly to how it's done forngFortemplate.Does this PR introduce a breaking change?
Consumers of ngIf API through templates will not be affected. It is possible that AoT compilation might expose some issues, but I am not familiar with the process, so it's hard for me to tell.
Other information
If PR is accepted it would be good to release the fix on all currently active release branches, so that users can take benefit from the fix even if they are on older version of Angular.