且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何延迟加载子路由?

更新时间:2022-06-25 20:42:31

在这种情况下,您将在惰性模块路由 (Uebersicht-routing.module.ts) 中添加该配置

In that case you would add that configuration in the lazy module routing (Uebersicht-routing.module.ts)

const routes: Routes = [
{
    path: '',
    children: [
        {   path: 'konditionen',
            loadChildren: './konditionen/konditionen.module#KonditionenModule',
        }
    ]
}]

并删除您拥有的孩子部分:

And remove the children part you have:

const routes: Routes = [
    {
        path: ':angebotsNummer',
        loadChildren: './uebersicht/uebersicht.module#UebersichtModule',
        resolve: { angebotReadModel: AngebotReadModelResolver }
    }]