【问题标题】:Intellisense for node_modules paths in angular-cli.json?angular-cli.json中node_modules路径的智能感知?
【发布时间】:2017-06-14 21:30:59
【问题描述】:

在 VS Code 中,有没有办法为 angular-cli.json 中的 node_modules 路径启用智能感知/自动完成?

这就是我得到的(angular-cli.json):

这就是我想要的(tsconfig.json):

我的 VS Code 版本是 1.8.1。我尝试了以下插件但没有成功:

  • 路径智能感知
  • npm 智能感知
  • Node.js 模块智能感知

由于某种原因,它们似乎在 angular-cli.json 中不起作用。

【问题讨论】:

    标签: angular visual-studio-code angular-cli node-modules


    【解决方案1】:

    使用Path Intellisense 扩展对我来说效果很好(VSCode 版本 1.28.2):

    基本路径不同,因为 angular-cli.json 在 Angular 6 中被移动并重命名为 angular.json

    【讨论】:

      【解决方案2】:

      你可以使用Relative Path Extension

      请访问文档链接

      https://marketplace.visualstudio.com/items?itemName=jakob101.RelativePath

      您可以将启动命令从Ctr+Shift+H更改为f2

      步骤:

      1. 在 vs 代码中点击设置
      2. 点击键盘快捷键
      3. 搜索相对路径
      4. 将命令改为 f2

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2020-10-02
        • 1970-01-01
        • 1970-01-01
        • 2017-06-19
        • 2023-03-30
        • 2022-10-18
        • 2017-06-15
        • 2019-10-05
        相关资源
        最近更新 更多