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

前端之家收集整理的这篇文章主要介绍了我如何使用角度语言服务?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我想使用能够在模板文件上完成的角度语言服务功能.

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

我错过了什么?

解决方法

猜你在找的Angularjs相关文章