I am building a Angular4 project using Angular CLI (1.1.2). It runs perfectly in Chrome (Version 59.0.3071.115) and firefox(54.0.1) but when I tried to use IE11 (Verison 11.0.9600.18738) nothings shows up and when I open the develper mode in IE, it shows me the following Error:
SCRIPT5022: Exception thrown and not caught File: polyfills.bundle.js, Line: 829, Column: 34
And the detailed Error message is following:
Anyone knows how to solve this problem?
Thanks!
There can be numerous reasons why your Angular application is not working, including: Missing polyfills in polyfills. ts . Using a TypeScript target version which IE11 does not support.
The Angular team is deprecating support for Internet Explorer 11 in Angular v12 (to be released in May 2021 and supported through November 2022), and plans to remove support for this browser in Angular v13 (late 2021).
Google has removed IE11 support in Angular 13. In the company that I work for, we have to keep IE11 support for the next few months due to contractual obligations.
To add more detail to @Zeqing's answer.
I uncommented the following line of codes in .\my-app\src\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';
The default polyfills.ts file is commented and need to uncomment lines of code and run npm install the corresponding module. Then it will compatible with the IE11
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With