刚搭建一个angular2的框架,angular版本2.4.0,webpack打包完浏览器console报错:
bundle.min.js:39162 Uncaught Error: Cannot resolve all parameters for 'Parser'(?). Make sure that all the parameters are decorated with Inject or have valid type annotations and that 'Parser' is decorated with Injectable.
但是angular版本改为2.0的就不会报错,代码也是最简单的官网上的demo,以下是tsconfig.json配置
{
"compilerOptions": {
"target": "es5",
"module": "commonjs",
"moduleResolution": "node",
"sourceMap": true,
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"removeComments": false,
"noImplicitAny": false
},
"exclude": [
"node_modules",
"typings/main",
"typings/main.d.ts"
],
"compileOnSave": false,
"buildOnSave": false
}
是ts配置出错还是什么原因呢,求解
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…