繁体   English   中英

IE11中未加载延迟加载的模块

[英]Lazy Loaded Module not loaded in IE11

我的angular 7应用程序有两个模块txxxxx模块和配置模块。 这两个模块都是从应用程序路由模块延迟加载的。 问题是,当我尝试导航到配置模块时,它抛出一条错误消息:“加载块组件-配置-配置模块失败。”。 仅在Internet Explorer中会发生此错误,它在Edge,Chrome,Safari和Firefox中可以正常工作。

这些是我已经尝试过的东西:

  1. 我将这些文件添加到了polyfills中,但无法解决我的错误。

 import 'core-js/es6/symbol'; import 'core-js/es6/object'; import 'core-js/es6/function'; import 'core-js/es6/parse-int'; import 'core-js/es6/parse-float'; import 'core-js/es6/number'; import 'core-js/es6/math'; import 'core-js/es6/string'; import 'core-js/es6/date'; import 'core-js/es6/array'; import 'core-js/es6/regexp'; import 'core-js/es6/map'; import 'core-js/es6/set'; 

  1. 我在index.ts中添加了以下行,但我没有解决我的错误:

 <meta http-equiv="X-UA-Compatible" content="IE=edge" /> 

我的应用程序路由模块是这样的:

 const routes: Routes = [{ path: '', pathMatch: 'full', redirectTo: 'trends' }, { path: 'txxxxx', canActivate: [AuthGuardService], loadChildren: './components/txxxxxx/txxxxx-ixxxxxx.module#Txxxxxxxxxxxxxxxxxx' }, { path: 'configuration', canActivate: [AuthGuardService], loadChildren: './components/configuration/configuration.module#ConfigurationModule' } ]; 

在IE上引发的错误是:

这可能会有所帮助:仅当我打开某些路由时,我的问题才会出现,并且我发现使用CKEditor的路由是该异常的原因,当我将其替换为文本区域时,该异常消失了,生活很幸福我在使用CK编辑器

检查github票

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM