由于我已将package.json更新为Angular2 RC6,因此出现错误TS2305:
我在package.json中的依赖关系如下
"dependencies": {
"@angular/common": "2.0.0-rc.6",
"@angular/compiler": "2.0.0-rc.6",
"@angular/compiler-cli": "0.6.0",
"@angular/core": "2.0.0-rc.6",
"@angular/forms": "2.0.0-rc.6",
"@angular/http": "2.0.0-rc.6",
"@angular/platform-browser": "2.0.0-rc.6",
"@angular/platform-browser-dynamic": "2.0.0-rc.6",
"@angular/router": "^3.0.0-rc.2",
"@angular/upgrade": "2.0.0-rc.6",
"angular2-in-memory-web-api": "0.0.18",
"angular2localization": "^0.10.0",
"bootstrap": "^3.3.6",
"core-js": "^2.4.1",
"es6-shim": "^0.35.0",
"moment": "^2.13.0",
"reflect-metadata": "^0.1.3",
"rxjs": "5.0.0-beta.11",
"systemjs": "0.19.27",
"zone.js": "^0.6.17"
答案 0 :(得分:1)
是的,谢谢你的回答!用路径替换RouterConfig后,用FormControl控制FormModel,用FormGroup等替换FormModel。我可以编译没有错误。