我正在做一个Angular项目,并将PrimeNg用于许多组件。
该项目在所有浏览器(IE11,Chrome)中本地运行时运行良好。但是当我在服务器(linux)上部署项目时,primeng图标不会被渲染。
我做了一些研究,发现在原始CSS文件中定义的css实体(见下文)并没有加载到服务器上的IE11中。
.pi-exclamation-triangle:before {
content: "\e922";
}
.pi-calendar:before {
content: "\e927";
}我在Index.html中添加了这一行
<meta http-equiv="X-UA-Compatible" content="ie=edge">,还更新了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/set';任何建议都将不胜感激。
发布于 2019-03-21 15:10:05
我看到你提到“原始的css文件(见下文)无法在服务器上的IE11中加载”。
我在下面的thread - Github中找到了一些变通方法或建议

希望这能有所帮助。
https://stackoverflow.com/questions/55275050
复制相似问题