问题
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.
This is the output that I am getting with Mozilla and Chrome where the website is running perfectly.
Can somebody explain why the site is not running in Edge?
回答1:
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.
- Un-comment some imports in the polyfill.ts file
- 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';
Install npm Pacakages
- npm install --save classlist.js
- npm install --save web-animations-js
回答2:
Try this :
Reset the IE settings
1) In Internet Explorer, select the Tools menu and then click Internet Options.
2) Click the Advanced tab, Click Reset button.
3) Click the Reset button while a prompt asks ”Are you sure you want to reset all the Internet Explorer settings?”.
4) Click OK, restart your IE.
Then check your issue
Hope this will help you.
来源:https://stackoverflow.com/questions/54999709/why-is-my-website-not-getting-loaded-in-internet-explorer