angular2 rc.4 layz routing

蹲街弑〆低调 提交于 2019-11-29 21:27:24

问题


Angular2 rc.4 lazy Routing is depreciated.

Async Routing example

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


回答1:


loadChildren is supposed to do that:

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

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

See also

  • 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' }


来源:https://stackoverflow.com/questions/38837493/angular2-rc-4-layz-routing

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