2

My angular 6 project loads in chrome but it does not load in IE11. I used the following question: Angular 2 / 4 / 5 not working in IE11 to try and solve the issue but none of the suggested solutions helped. Here is a list of the imports I have in polyfills.

1) I uncommented all of the imports in my polyfills.ts and ran the appropriate npm install commands. 2) I added the following line in my index.html

  <meta http-equiv="X-UA-Compatible" content="IE=edge" />

3) And I also turned off the "Display intranet sites in Compatibility View" in IE11 as suggested in the post

but none of the following solutions helped.

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';

import 'classlist.js';  

import 'core-js/es6/reflect';
import 'core-js/es7/reflect';

import 'web-animations-js';

import 'zone.js/dist/zone';

Any ideas on what I may be missing since this is an Angular 6 project?

zlopez119
  • 123
  • 1
  • 2
  • 8
  • have you looked into the overall size of the project? IE notoriously bad for loading well. Do you have any errors present anywhere to help work with? – devDan Sep 06 '18 at 19:54
  • The only error I see is a SCRIPT1002: Syntax error in the vendor.js file but when I click on it the problem does not seem obvious. It just takes me to an AccessTokenEvents class – zlopez119 Sep 07 '18 at 12:54
  • same thing here...is @Lloyd Smith answer helped you? I tried it and it fail as well – Green Oct 31 '18 at 14:02

3 Answers3

2

Did you verify that any subscribe function that is running outside of your ts files are using

.subscribe(function(data) { });

instead of

.subscribe((data) => {});

IE is not able to execute this style of anonymous function properly.

Also make sure you are not using any ES6 components outside of your angular app without having a shim to handle them (https://kangax.github.io/compat-table/es6/)

Lloyd Smith
  • 1,187
  • 12
  • 21
0

An update of angular-cli, webpack might be helpful.

I have solved an issue in IE 10. Reference: TypeError: Unable to get property 'ngMetadataName' of undefined or null reference on IE 10

Md. Masudur Rahman
  • 1,028
  • 12
  • 30
0

I followed the suggestion to comment out code until my App started in IE 11.

I had an image path in my menu component that was causing the issue. Sorted the path and the app started.