更新到角度2 RC后,我得到以下错误:
error TS7008: Member 'summary' implicitly has an 'any' type.
在这行:
@Input() summary;
怎么了?
编辑:好的,好像我在任何一个我的公共变量上都收到这个错误.
也许您更改了TypeScript编译器配置中noImplicitAny属性的值…请参阅tsconfig.json文件:
原文链接:https://www.f2er.com/angularjs/142710.html{ "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" ] }
@Input() summary:string;