【发布时间】:2017-08-18 09:33:03
【问题描述】:
自 2.beta 以来,我正在构建一个 Angular 项目。我很高兴后来发现 WebStorm 支持 Angular 语言服务。但我不能让它在我的项目中工作。
如果我使用 angular-cli 创建一个新项目,WebStorm 可以完美运行并支持它。但是我无法让它与我的旧项目一起使用,即使我现在在 4.3.5 版本上运行所有@angular-packages。
我尝试使用“设置 -> 语言和框架 -> Typescript -> 使用 TypeScript 服务”来激活它,但复选框没有显示。
它在文档中说您只需要将语言服务安装为开发依赖项并具有(任何?)tsconfig.json。
这是我的 tsconfig.json:
{
"compilerOptions": {
"moduleResolution": "node",
"module": "es2015",
"target": "es5",
"noImplicitAny": false,
"sourceMap": false,
"experimentalDecorators": true,
"emitDecoratorMetadata": true,
"typeRoots": [
"node_modules/@types"
],
"lib": [
"es2016",
"dom"
]
},
"include": [
"src"
],
"exclude": [
"node_modules"
]
}
我猜文档没有提到更多,因为它大部分时间都是开箱即用的......
【问题讨论】:
-
你用的是什么打字稿版本?
-
@Maximus typescript@2.3.4
标签: angular typescript webstorm