Angular 2 - how to use the new angular 2.0.0-rc.1 router

后端 未结 6 1955
被撕碎了的回忆
被撕碎了的回忆 2020-12-13 13:11

I\'ve started to write a new angular 2 project and I found that I installed 2 angular router:

  1. \"@angular/router\": \"2.0.0-rc.1\",
6条回答
  •  刺人心
    刺人心 (楼主)
    2020-12-13 13:47

    This helped me get started with the new router: https://angular.io/docs/ts/latest/guide/router.html

    EDIT: Above link is empty for now.. cached version thanks to tylerjgarland: https://web.archive.org/web/20160416143350/https://angular.io/docs/ts/latest/guide/router.html

    I also found Misko Hevery's router talk from ng-conf helpful: https://www.youtube.com/watch?v=d8yAdeshpcw

    UPDATE: It appears that the RC1 Router is being abandoned? https://github.com/angular/angular/issues/9088 Perhaps that is why the docs disappeared rather than being completed...

    UPDATE 2: The RC2 Router has now been released: https://angular.io/docs/ts/latest/guide/router.html

    The Component Router is in alpha release. This is the recommended Angular 2 router and supersedes the earlier deprecated beta and v2 routers.

    this line in package.json for the new alpha router:

    "@angular/router": "3.0.0-alpha.7",
    

    as I found out here: Installing Angular 2 RC2 w/ new component router

提交回复
热议问题