2

My angular application works fine with all web browsers except internet explorer. It shows this error in console.

enter image description here

polypills.ts looks like this,

 * BROWSER POLYFILLS
 */

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
import 'core-js/es6/object';
import 'core-js/es6/function';
 import 'core-js/es6/number';
import 'core-js/es6/string';
import 'core-js/es6/array';

/** Evergreen browsers require these. **/
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
import 'core-js/es7/reflect';

(window as any).__Zone_enable_cross_context_check = true;
kevin_Aberathna
  • 441
  • 1
  • 5
  • 13
  • 1
    you can refer below link: https://stackoverflow.com/questions/35140718/angular-2-4-5-not-working-in-ie11 – Vignesh Jan 30 '20 at 07:20

1 Answers1

0

since the answers from Angular 2 / 4 / 5 not working in IE11

didn't work with me, I found the issue was not with the polyfills. Error has come from the new java-script function which used syntax's not supported by IE. Only works with browsers like chrome. I change the syntax to older version and fixed the issue. Now works fine with IE too.

kevin_Aberathna
  • 441
  • 1
  • 5
  • 13