-
Notifications
You must be signed in to change notification settings - Fork 115
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鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Automatic NgModule Imports #1501
Comments
@dylhunn This is great news 馃コ. Will it also import the module in @component imports array? |
That's an interesting point; probably we should. I'm looking at it more from the standalone angle as well though. |
Expecting this feature~ |
@dylhunn As far as I can tell, this is working with components that are declared in NgModules and standalone components so I think we can close this as completed. Is that correct? |
@dylhunn Yes, closing this! |
@dylhunn What about the same feature with external libraries? |
I'm intending to enable this for external libraries in a future release. I was worried about performance issues, and so I put it on the back burner for a while. (Although the primary motivation is standalone, there's no reason we can't also do it for NgModules) |
May be we can have an option to opt-in |
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. |
Is your feature request related to a problem? Please describe.
No
馃殌 feature request
Description
One of the killer features of Webstorm when working with angular is the ability to automatically import NgModules from templates as an auto completion for components, directives and pipes.
It would be fantastic if such a feature could be brought into vsc
Feature Type
What does this bug affect
Describe the solution you'd like
This is probably a tricky problem to solve as it relies on knowing all the possible NgModules (something that even TypeScript struggles with for things like submodules imports of @angular/material) and then adding the import via a code completion to a file that is potentially not open.
The closest thing I can think of that currently exist in vsc is renaming files automatically updating their imports which I believe the TypeScript language service manages.
Describe alternatives you've considered
Anything else relevant?
WebStorm added this feature in 2019 but I don't think their work on it is open source, at least I couldn't find it easily.
The text was updated successfully, but these errors were encountered: