vscode and angular:自动导入/导出/声明来自另一个模块的组件
我已经使用了WebStorm一段时间了,但是由于某种原因,我决定移至VScode。 在大多数情况下,除了一个问题外,一切都适合我。
如果我创建一个模块(例如 core ),然后在“ core ”模块中创建一个组件(例如, header ),则当我尝试使用“ core ”中的组件时,在“ app.component.html ”中(< app-header></app-header> )如果我在“ core ”模块中正确声明出口和“ app ”模块中的声明,我会遇到汇编错误。
在WebStorm中,如果我在模板中指定一个组件选择器,那么一切都会自行发生,而我不需要自己的手来做。即使我专门删除了组件的导出,也会出现提示,这要归功于我可以修复所有内容。
可以在VSCODE中实现相同的功能吗?
I've been using WebStorm for a while, but for some reason i decided to move to VSCode.
For the most part, everything suits me, except except for one problem.
If i create a module (for example, core) and create a component (for example, header) inside the "core" module, then when i try to use the component from "core" in "app.component.html" (<app-header></app-header>) i get compilation errors that disappear if i make a proper declaration of exports in "core" module and declarations in the "app" module.
In WebStorm, if i specify a component selector in the template, then everything happens by itself and i don't need to do it with my own hands. Even if i specifically delete the export of the component, a hint will appear to me, thanks to which i can fix everything.
Is it possible to achieve the same in VSCode?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论