IE11 empty page using Angular 7

2019-08-24 09:26发布

I'm testing my personal website from host. It works fine with chrome, safari, firefox, almost fine with edge, and not at all with IE11. The page displayed is index.html, the scripts don't load and so, my page is desperately white. What direction should I look at?

Below is the source code after loading, it just renders the index.html

<!doctype html>
<html lang="fr">
<head>
  <meta charset="utf-8">
  <title>xxxxx</title>
  <base href="/">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="icon" type="image/x-icon" href="favicon.ico">
  <link href="https://fonts.googleapis.com/css?family=Open+Sans:300, 400|Permanent+Marker|Fredoka+One" rel="stylesheet">
  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.2/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">

<link rel="stylesheet" href="styles.e51f265321605de0a6b8.css"></head>
<body>
  <app-root></app-root>
  <script type="text/javascript" src="polyfills.46532d96d3286697c138.js">
</script>
<script type="text/javascript" src="runtime.a5dd35324ddfd942bef1.js"></script><script type="text/javascript" src="main.d7a4eeb20e2af3af291c.js"></script>
</body>
        </html>

3条回答
Summer. ? 凉城
2楼-- · 2019-08-24 09:39

You should look if you have the good polyfills.

And do you have errors in your console ?

查看更多
欢心
3楼-- · 2019-08-24 09:47

Besides activating polyfills I personally also had to unchecked "Display intranet sites in Compatibilty View" under "Compatibility View Settings" in a productive environment. Maybe this applies to you, too.

查看更多
你好瞎i
4楼-- · 2019-08-24 10:05

polyfills.ts

/** 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';
查看更多
登录 后发表回答