【发布时间】:2018-01-24 17:28:42
【问题描述】:
我想使用能够对模板文件进行补全的 Angular 语言服务功能。
我正在尝试让插件与我使用的 Atom 包一起使用 atom-typescript。
我已经添加了要在 html 文件上激活的包。
这是我的 tsconfig.json 文件
{
"compileOnSave": false,
"compilerOptions": {
"outDir": "./dist/out-tsc",
"sourceMap": true,
"declaration": false,
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"target": "es5",
"typeRoots": [
"node_modules/@types"
],
"plugins": [{ "name": "@angular/language-service" }],
"lib": [
"es2016",
"dom"
]
}
}
这是 package.json
"dependencies": {
"@angular/animations": "^4.0.0",
"@angular/common": "^4.0.0",
"@angular/compiler": "^4.0.0",
"@angular/core": "^4.0.0",
"@angular/forms": "^4.0.0",
"@angular/http": "^4.0.0",
"@angular/platform-browser": "^4.0.0",
"@angular/platform-browser-dynamic": "^4.0.0",
"@angular/router": "^4.0.0",
"core-js": "^2.4.1",
"rxjs": "^5.4.1",
"zone.js": "^0.8.14"
},
"devDependencies": {
"@angular/cli": "1.2.2",
"@angular/compiler-cli": "^4.0.0",
"@angular/language-service": "^4.3.4",
atom-typescript 使用 typescripts tsserver。所以我很确定这行得通。放一些日志跟踪,我可以看到 Angular 语言服务确实被初始化了。
我错过了什么?
【问题讨论】:
标签: angular typescript atom-editor