为什么我的网站没有加载到Internet Explorer中? [英] Why is my website not getting loaded in Internet Explorer?

查看:112
本文介绍了为什么我的网站没有加载到Internet Explorer中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

最近,我尝试将网站托管在AWS Elastic Beanstalk中.该网站已启动并开始运行,现在我可以使用Chrome和Mozilla对其进行访问.但是,使用Microsoft Edge打开它时,它给了我以下错误.

Recently I tried to host my website in AWS Elastic Beanstalk. The website got up and running and now I can access it using Chrome and Mozilla. However, it is giving me the following error while opening it using Microsoft Edge.

这是我在Mozilla和Chrome上获得的输出,它们在网站上运行得很好.

This is the output that I am getting with Mozilla and Chrome where the website is running perfectly.

有人可以解释为什么站点不在Edge中运行吗?

Can somebody explain why the site is not running in Edge?

推荐答案

Angular CLI应用程序需要更多步骤才能支持Internet Explorer. 这非常简单:取消注释一些导入并安装几个npm软件包. 我们看到此错误,是因为Internet Explorer只是不支持许多JavaScript的常用部分.对于数组函数尤其如此.

Angular CLI applications require a few more steps in order to support Internet Explorer. It’s really simple: un-comment a few imports and install a couple of npm packages. We see this error because there are a lot of commonly used parts of JavaScript that Internet Explorer just doesn’t support. This is especially true for array functions.

  1. 取消注释polyfill.ts文件中的某些导入
  2. 安装几个npm软件包. 首先在您的IDE或文本编辑器中打开文件:ie-test \ src \ polyfills.ts
  1. Un-comment some imports in the polyfill.ts file
  2. Install a couple of npm packages. First open the file in your IDE or text editor: ie-test\src\polyfills.ts

取消注释其中的所有导入行.对我来说,简单的方法就是替换所有 //进口 和 **

Un-comment all the import lines in there. For me, the easy way is just to replace all // import with **

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';
import 'core-js/es6/array';
import 'classlist.js';
import 'core-js/es6/reflect';
import 'web-animations-js';
import 'zone.js/dist/zone';

安装npm功能

Install npm Pacakages

  1. npm install-保存classlist.js
  2. npm install-保存web-animations-js

这篇关于为什么我的网站没有加载到Internet Explorer中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆