VS2017中的Angular 2错误

时间:2017-04-04 06:31:54

标签: angular visual-studio-2017

在VS2015中,我对Angular2没有任何错误。我已将我的代码移植到VS2017,现在总共有78个错误,所有代码都有TS2304或TS2339错误,它们都与

有关
  

index.d.ts

这是我的tsconfig.json文件:

{  
"compilerOptions": {
"noImplicitAny": true,
"noEmitOnError": true,
"removeComments": false,
"sourceMap": true,
"target": "es6",
"moduleResolution": "node",
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"module": "commonjs",
"suppressImplicitAnyIndexErrors": true  },
"exclude": [
  "node_modules/*"
  ],
  "typeRoots": [
  "node_modules/@types/"
  ]
}

同样奇怪的是,我有6个项目组成了我的解决方案。只有1个项目需要angular和typescript引用,因为所有其他项目都是我的服务和存储库层的.net核心库项目。错误都是针对其他5个项目(不需要参考的项目)。

enter image description here

1 个答案:

答案 0 :(得分:0)

要进行修复,请将“目标”值( tsconfig.json )更改为“.form-group label Category: select.form-control(name='category') if catList each cat, i in catList option(value = '#{cat.title}') #{cat.title} ”或其他值。

示例:

res.render()
相关问题