【问题标题】:angular2 rc.4 layz routingangular2 rc.4layz 路由
【发布时间】:2016-12-14 17:13:42
【问题描述】:

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

Async Routing example

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

【问题讨论】:

    标签: angular routing lazy-loading


    【解决方案1】:

    loadChildren 应该这样做:

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

    我不知道字符串到底应该指向什么。

    另见

    { path: 'heroes', loadChildren: 'app/hero/hero.module' }
    

    【讨论】:

    • 不会解决我的问题我需要这样的东西 new AsyncRoute({ path: '/about', name: 'About', loader: () => { return System.import(' app/components/about/about') .then(m=> m.AboutComponent); } })
    • 请检查以下问题,我有点解决这个stackoverflow.com/questions/38860071/…
    猜你喜欢
    • 2016-12-20
    • 2016-10-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2017-12-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多