Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

angular2 rc.4 layz routing

Angular2 rc.4 lazy Routing is depreciated.

Async Routing example

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

like image 999
d-man Avatar asked Aug 08 '16 19:08

d-man


1 Answers

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' }
like image 104
Günter Zöchbauer Avatar answered Sep 27 '22 20:09

Günter Zöchbauer