简体   繁体   中英

Angular2 RC6 Update

Since I have updated my package.json to Angular2 RC6 I get errors TS2305:

  • "../@angular/router/index" has no exported member 'RouterConfig'
  • "../@angular/common/index" has no exported member 'Control', 'ControlGroup','Validators', etc.

My dependencies in package.json are as follows

"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"

Yes thank you for your answer! After I have replaced RouterConfig with Routes, Control with FormControl, FormModel with FormGroup etc. I can compile without errors.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM