首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >角5应用程序不会在IE11中呈现

角5应用程序不会在IE11中呈现
EN

Stack Overflow用户
提问于 2018-06-14 08:50:37
回答 1查看 1.1K关注 0票数 2

我有一个角形5应用程序,工作在Chrome,Opera,Firefox和边缘完美。但在IE11中,该应用程序没有渲染。我包含了polyfills.ts文件,并安装了npm包classlist.jsweb-animations-js

代码语言:javascript
复制
/** IE9, IE10 and IE11 requires all of the following 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/weak-map';
 import 'core-js/es6/set';

/** IE10 and IE11 requires the following for NgClass support on SVG elements */
 import 'classlist.js';  // Run `npm install --save classlist.js`.

/** IE10 and IE11 requires the following for the Reflect API. */
 import 'core-js/es6/reflect';


/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import 'core-js/es7/reflect';


/**
 * Web Animations `@angular/platform-browser/animations`
 * Only required if AnimationBuilder is used within the application and using IE/Edge or Safari.
 * Standard animation support in Angular DOES NOT require any polyfills (as of Angular 6.0).
 **/
import 'web-animations-js';  // Run `npm install --save web-animations-js`.

/**
 * By default, zone.js will patch all possible macroTask and DomEvents
 * user can disable parts of macroTask/DomEvents patch by setting following flags
 */

 // (window as any).__Zone_disable_requestAnimationFrame = true; // disable patch requestAnimationFrame
 // (window as any).__Zone_disable_on_property = true; // disable patch onProperty such as onclick
 // (window as any).__zone_symbol__BLACK_LISTED_EVENTS = ['scroll', 'mousemove']; // disable patch specified eventNames

 /*
 * in IE/Edge developer tools, the addEventListener will also be wrapped by zone.js
 * with the following flag, it will bypass `zone.js` patch for IE/Edge
 */
// (window as any).__Zone_enable_cross_context_check = true;

/***************************************************************************************************
 * Zone JS is required by default for Angular itself.
 */
import 'zone.js/dist/zone';  // Included with Angular CLI.



/***************************************************************************************************
 * APPLICATION IMPORTS
 */

在IE11控制台中,我得到了以下错误:

我怎样才能让我的应用程序在IE11中工作?

在@Pako应答之后,应用程序现在在IE11中呈现,但当我尝试发出登录请求时会引发一个错误

对象不接受属性或“值”方法。

这个错误是由Object.values()引起的,因为它在IE11中不受支持。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2018-06-14 08:57:44

可以尝试将此代码添加到index.html的头中

代码语言:javascript
复制
<meta http-equiv="X-UA-Compatible" content="IE=edge" />

我觉得很管用

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/50853402

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档