1

I'm trying to use my Angular 2 app to my IE. I added all polyfills needed to do it and all work fine on my localhost application. But when i go to build the app and copy my dist folder to the server folder (with IIS) i receive this errors:

enter image description here

I don't have any idea..

Steph8
  • 1,483
  • 2
  • 16
  • 32
  • Do you have `` at the top of your `head` tag? See: https://stackoverflow.com/questions/25557299/internet-explorer-11-disable-display-intranet-sites-in-compatibility-view-via – Joe Clay Nov 30 '17 at 16:45
  • yes i have . And on local environment all work fine. – Steph8 Dec 01 '17 at 10:50

1 Answers1

0

Reason: There are browser compatibility issues with Angular. Some of the ES6 script functions and methods are not supported in IE.

Solution: add these following script headers in your head section of index.html along with the polyfills tags

   <script src="https://cdnjs.cloudflare.com/ajax/libs/es5-shim/4.4.1/es5-shim.js"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/es6-shim/0.34.1/es6-shim.js"></script>
   <script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.20/system-polyfills.js"></script>
   <script src="https://npmcdn.com/angular2/es6/dev/src/testing/shims_for_IE.js"></script>

Source: Another Answer on stackoverflow