SmartestVEGA
SmartestVEGA

Reputation: 8909

Angular 6 website not working on IE but works locally on all browsers

I have an angular website working fine in chrome browser (all versions) on my laptop

I changed the mode of IE to compatibility and observed following errors in console:

SCRIPT5009: 'Promise' is undefined
jspdf.min.js (118,654)
SCRIPT1002: Syntax error
main.js (8527,59)
SCRIPT5011: Can't execute code from a freed script
zone.js (2775,1)

Upvotes: 0

Views: 1210

Answers (2)

moefinley
moefinley

Reputation: 1339

This is a known bug relating to zone.js and the IE Developer Tools. https://github.com/angular/angular/issues/31723

The development workaround is to add this flag before loading zone.js

(window as any).__Zone_enable_cross_context_check = true;
import 'zone.js/dist/zone';

Upvotes: 0

Akber Iqbal
Akber Iqbal

Reputation: 15041

To get Angular App working on IE, go to polyfills.ts and uncomment the following

/** 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/weak-map';
 import 'core-js/es6/set';

Upvotes: 1

Related Questions