Installing Angular 2 RC2 w/ new component router

橙三吉。 提交于 2019-12-05 07:31:33

For the new release of angular rc2. The version of router to install is

"@angular/router" : "3.0.0-alpha.6" or "@angular/router" : "3.0.0-alpha.7"

The repo for the router is at https://github.com/angular/vladivostok . The docs on the site https://angular.io/docs/ts/latest/guide/router.html are on alpha.6. I would advice to go through the changelog to know about breaking changes when using alpha.7

If you just started to work with Angular router, I suggest you disregard RC1 router and start with the new router v3.

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

Here is the documentation for Router v3.

The router is not maintained as a separate project anymore. It has been recently merged into Angular2 and the router is now in beta.. I would suggest you to use start using the beta by adding a dependency in your package.json file "@angular/router": "3.0.0-beta.2"

it is now at V3.RC1. So please update your package.json accordingly

"@angular/router": "3.0.0-rc.1",

You might also have to upgrade your application to Angular2.RC5 and change the way routing is done.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!