Angular 7 project is not working in Internet Explorer 11

后端 未结 2 943
暖寄归人
暖寄归人 2021-01-11 15:18

I have done all whatever mentioned in different posts over internet but my issue still persists.

I un-commented the polyfills required for IE 9, 10, 11

相关标签:
2条回答
  • 2021-01-11 15:42

    What about upgrading to angular v8 ?

    Since the last major version the build process has been optimized for old browsers.

    In Angular CLI version 8 and higher, applications are built using differential loading, a strategy where the CLI builds two separate bundles as part of your deployed application.

    • The first bundle contains modern ES2015 syntax, takes advantage of built-in support in modern browsers, ships less polyfills, and results in a smaller bundle size.

    • The second bundle contains code in the old ES5 syntax, along with all necessary polyfills. This results in a larger bundle size, but supports older browsers.

    Development on IE

    You should take a look at https://stackoverflow.com/a/56573079/4467001 to solve some issue on development mode and css since you upgraded angular to v8

    0 讨论(0)
  • 2021-01-11 15:49

    I solve this problem with below 4 steps ! for you, start from step3.

    1. Find polyfill.ts in your project

    2. Uncommented all commented import - save

    3. Install below npm

      • npm install --save classlist.js
      • npm install --save web-animations-js
    4. ng serve

    credit : https://blog.angularindepth.com/angular-and-internet-explorer-5e59bb6fb4e9

    ++If you are using angular8 please refer to : https://stackoverflow.com/a/59317315/10109195

    0 讨论(0)
提交回复
热议问题