简体   繁体   中英

Angular does not work in IE and smart tv browsers

My website is built with Angular 12 and SSR. but It doesn't work on IE or Samsung TV browsers. i added these lines to my polyfills.ts.

import "core-js/es/symbol";
import "core-js/es/object";
import "core-js/es/function";
import "core-js/es/parse-int";
import "core-js/es/parse-float";
import "core-js/es/number";
import "core-js/es/math";
import "core-js/es/string";
import "core-js/es/date";
import "core-js/es/array";
import "core-js/es/regexp";
import "core-js/es/map";
import "core-js/es/weak-map";
import "core-js/es/set";
import "core-js/es/reflect";

and changed target property in ts-config file to es5. but still it is not working. Is there anything else I should do?

IE is deprecated but you can look at this links :

In a .browserslistrc file you probably need to add this:

last 1 version
> 1%
IE 11
Samsung 

删除所有 core-js 并在 polyfills 中尝试这个

import 'core-js';

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM