加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

我如何使用角度语言服务?

发布时间:2020-12-17 16:59:36 所属栏目:安全 来源:网络整理
导读:我想使用能够在模板文件上完成的角度语言服务功能. 我正在尝试让插件使用Atom包,我使用atom-typescript. 我已经添加修复了要在html文件上激活的包. 这是我的tsconfig.json文件 { "compileOnSave": false,"compilerOptions": { "outDir": "./dist/out-tsc","s
我想使用能够在模板文件上完成的角度语言服务功能.

我正在尝试让插件使用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.所以我很确定它有效.放一些日志跟踪,我可以看到角度语言服务确实初始化.

我错过了什么?

解决方法

它还不支持atom-typescript.

更多信息:

https://github.com/TypeStrong/atom-typescript/issues/1278

https://github.com/TypeStrong/atom-typescript/issues/1355

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读