Angular 在IE浏览器中,未捕获(承诺中):错误:加载区块modulename模块失败
我在angular 7中使用了惰性加载概念。我已经创建了带有侧菜单的项目。在侧菜单中路由页面时,我得到的错误是“未捕获(承诺中):错误:加载chunk modulename模块失败”。但是, app-routing.module.tsAngular 在IE浏览器中,未捕获(承诺中):错误:加载区块modulename模块失败,angular,internet-explorer-11,Angular,Internet Explorer 11,我在angular 7中使用了惰性加载概念。我已经创建了带有侧菜单的项目。在侧菜单中路由页面时,我得到的错误是“未捕获(承诺中):错误:加载chunk modulename模块失败”。但是, app-routing.module.ts const routes: Routes = [ { path: '', redirectTo:'login', pathMatch: 'full' }, { path: 'parent', loadChildren: './layout/layout.m
const routes: Routes = [
{ path: '', redirectTo:'login', pathMatch: 'full' },
{ path: 'parent', loadChildren: './layout/layout.module#LayoutModule'},
{ path: 'login', component: LoginComponent}
];
const routes: Routes = [
{
path: '',
component: LayoutComponent,
children: [
{ path: 'dashboard', loadChildren: '../dashboard/dashboard.module#DashBoardModule'},
{ path: 'test', loadChildren: '../test/test.module#TestModule'},
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' }
]
}
];
layout-routing.module.ts
const routes: Routes = [
{ path: '', redirectTo:'login', pathMatch: 'full' },
{ path: 'parent', loadChildren: './layout/layout.module#LayoutModule'},
{ path: 'login', component: LoginComponent}
];
const routes: Routes = [
{
path: '',
component: LayoutComponent,
children: [
{ path: 'dashboard', loadChildren: '../dashboard/dashboard.module#DashBoardModule'},
{ path: 'test', loadChildren: '../test/test.module#TestModule'},
{ path: '', redirectTo: 'dashboard', pathMatch: 'full' }
]
}
];
layout.component.ts
navItems: NavItem[] = [
{
displayName: 'TEST',
iconName: 'speaker_notes',
route: 'test',
children: [
{
displayName: 'Bulk Download',
iconName: 'cloud_download',
route: 'parent/test'
}]
}
]
在这里,我在侧菜单中“测试”导航时出错
任何人的帮助都将被感激 我已经尝试创建一个用于检查延迟加载和测试代码的工具,看起来在我的IE11浏览器上一切都很好。因此,您是否可以发布足够的代码来重现中的问题(例如使用)。此外,你也可以检查一下。