路由器和angular2中不推荐使用的路由器之间的差异



我已经从"beta.17"更新到了"2.0.0-rc.1",我不知道什么时候应该使用路由器,什么时候不推荐使用路由器?

更新到ANGULAR2 RC

在RC之后,angular 2中的路由发生了很多变化,其中一些点我要在这里提到,可能会对某人有所帮助:-

  1. angular2/router已更改为@angular/router(您也可以使用旧的路由功能,使用@angular/router-deprecated的导入,但现在我们必须使用@angular/router)。

  2. CCD_ 5已被CCD_。

例如:-

@Routes([
  {path: '/crisis-center', component: CrisisListComponent},
  {path: '/heroes',        component: HeroListComponent}
])

请放心,我会很快根据更新日志中的更新来更新我的答案。感谢@Benedikt的评论新的@Route更新到angular2 RC 的文章

最新更新