Microsoft Edge上的角度应用未加载CSS

问题描述 投票:-1回答:1

我的Angular应用在所有浏览器上均能完美运行,但在Edge和IE上,它不会加载CSS。很难解释,因为它加载了,但是不起作用,我不知道为什么。

如您所见:

Image

css就在头上,但应用程序就像根本没有css。

我添加了所需的所有polyfill和这个metatag:

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

我在Google上搜索了很多,但是所有解决方案都是关于应用程序根本无法运行,我的应用程序可以运行,但没有CSS。

这是我的Polyfills.ts

import 'zone.js/dist/zone';  // Included with Angular CLI.
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';

谢谢!

css angular edge
1个回答
0
投票

检查您的browserlist文件,位于项目的根目录。默认情况下,通常不支持IE11。

您将发现必须更改的这一行

not IE 9-11 # For IE 9-11 support, remove 'not'.
© www.soinside.com 2019 - 2024. All rights reserved.