2

I have developed an Angular 6 Project. All is working well in Chrome, Mozilla and Apple browsers, but it is not working in Internet Explorer 11. I am unable to save the data on clicking button.

In the console(Network), when clicking the button, it's not calling the API.

Do I need any special import in angular TS file for IE11?

Ruli
  • 2,592
  • 12
  • 30
  • 40
ABHILASHA K.M
  • 146
  • 1
  • 4
  • 16
  • 1
    Does this answer your question? [Angular 2 / 4 / 5 not working in IE11](https://stackoverflow.com/questions/35140718/angular-2-4-5-not-working-in-ie11) – Nithya Rajan Mar 24 '20 at 05:05
  • Do you get an error message? – Kurt Hamilton Mar 24 '20 at 06:41
  • 2
    Try to set debugger in the button click event, whether the function is called? Besides, Can you post enough code or create a [stackblitz sample](https://stackblitz.com/) to reproduce the problem? It might be easier for us to narrow down the issue. – Zhi Lv Mar 25 '20 at 03:15
  • Please add a [stackblitz sample](https://stackblitz.com) – luiscla27 Sep 15 '21 at 05:05

3 Answers3

2

Go to your polyfills.ts file and find the import statements commented out under the section /** IE9, IE10 and IE11 requires all of the following polyfills. */:

// import 'classlist.js';  // Run `npm install --save classlist.js`.

Uncomment the above import to have your app working with those IE browsers but don't forget to run the following command.

npm install --save classlist.js

You might be also required to uncomment the following import:

// import 'web-animations-js';  // Run `npm install --save web-animations-js`.

And not to forget to run the following command:

npm install --save web-animations-js

EDIT

In browserslist file, you may replace not IE 9-11 with IE 9-11.

Also, in tsconfig.json file, you may replace "target": "es2015" (or whatever) with "target": "es5".

Salahuddin Ahmed
  • 4,854
  • 4
  • 14
  • 35
0

Your question does not contain enough information to give an actual answer. However, IE11 + form gave me some trouble in the past.

In my case I had to add type='submit' to the submit button and type='button' to all other buttons.

Katinka Hesselink
  • 3,961
  • 4
  • 20
  • 26
Robin Dijkhof
  • 18,665
  • 11
  • 65
  • 116
0

On the angular website it is clear written that does not support internet explorer 11 you will have to configure your angular project by using following steps written in readme file of this github page.

https://github.com/browserslist/browserslist

Asim Khan
  • 31
  • 5