angular2 rc.4莱兹路由 [英] angular2 rc.4 layz routing

查看:51
本文介绍了angular2 rc.4莱兹路由的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Angular2 rc.4惰性路由已弃用.

Angular2 rc.4 lazy Routing is depreciated.

异步路由示例

对于rc.4是否有任何新的惰性路由/异步路由示例

is there any new lazy routing / async routing example for rc.4

推荐答案

loadChildren应该这样做:

{
  path: 'section',
  loadChildren: 'section-bundle'
}

我不知道字符串应该确切指向什么.

I don't know what exactly the string should point to.

另请参见

  • https://github.com/angular/angular/issues/9527#issuecomment-236038503
  • https://github.com/angular/angular/issues/10577 (with Plunker)
{ path: 'heroes', loadChildren: 'app/hero/hero.module' }

这篇关于angular2 rc.4莱兹路由的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆