Angular 2 rc3 router-deprecated package issue

前端 未结 4 2095
遥遥无期
遥遥无期 2021-01-18 06:50

Welcome Angular 2 rc.3!

I use project.json from 5 Min Quickstart to configure my project, but when i run npm install i get follow error:

相关标签:
4条回答
  • 2021-01-18 07:25

    I think so its by mistake

    try the last version of release

      "@angular/router-deprecated":  "2.0.0-rc.2",
    
    0 讨论(0)
  • 2021-01-18 07:32

    Angular2 RC3 brings back the new router. But the Tutorial continues to mention router-deprecated. Check out the Developer guide which has documentation on the latest Router: https://angular.io/docs/ts/latest/guide/router.html

    As mentioned in the comments, you can give it a try using

    "@angular/router": "3.0.0-alpha.7"
    
    0 讨论(0)
  • 2021-01-18 07:35

    i'm running rc.2, but with the new component router. https://angular.io/docs/ts/latest/guide/router.html. here's the package.json

    "dependencies": {
    "@angular/common":  "^2.0.0-rc.2",
    "@angular/compiler":  "2.0.0-rc.2",
    "@angular/core":  "2.0.0-rc.2",
    "@angular/http":  "2.0.0-rc.2",
    "@angular/platform-browser":  "2.0.0-rc.2",
    "@angular/platform-browser-dynamic":  "2.0.0-rc.2",
    "@angular/router":  "3.0.0-alpha.6",
    "@angular/upgrade":  "2.0.0-rc.2",
    "systemjs": "0.19.31",
    "core-js": "^2.4.0",
    "reflect-metadata": "^0.1.3",
    "rxjs": "5.0.0-beta.6",
    "zone.js": "^0.6.12",
    "angular2-in-memory-web-api": "0.0.12",
    "bootstrap": "^3.3.6",
    "contentful": "3.3.14"
    

    }

    i'm using the alpha6, cause i didn't got alpha7 working. anyhow, if you starting new in a project, i would go for the new component router. the developer even recommend it: http://angularjs.blogspot.ch/2016/06/improvements-coming-for-routing-in.html

    0 讨论(0)
  • 2021-01-18 07:35

    You guessed right, the QuickStart tutorial doc was in fact wrong, and the Pull Request handling this has just recently merged its commits. Should you go to the QuickStart docs again, you'll see it's been updated!

    Here's the closed Pull Request: https://github.com/angular/angular.io/pull/1727

    So no worries, you were doing just fine!

    0 讨论(0)
提交回复
热议问题