How to run an angular app in IE?

VANDANA GUPTA
2 min readMay 29, 2021
Photo by Caspar Camille Rubin on Unsplash

Getting a white page on your IE screen? Worry not!!!

We will follow the following steps to run the app on dev:

  1. Uncomment few imports in the pollyfills.ts file.
  2. Install few npm packages
  3. Modify the browserslist file
  4. Modify tsconfig.json file

Pollyfills.ts imports

You will find this file here \src\pollyfills.ts. You need to un-comment the imports for the classlist.js and web-animations-js.

Install npm packages

You need to install the npm packages which we just un-commented by running the following two commands.

Modify the browserslist file

You will find this file inside the root of the project. The default browserslist file is something like this:

You need to remove the ‘not’ from the last line which will look like this,

Modify tsconfig.json file

You will find this file inside the root of the project. The default tsconfig.json is something like this.

Internet Explorer doesn’t automatically generate the ES5 bundle. So we need to change the target to :

Now run the ng serve command and here you go. You will see the application running successfully on internet explorer.

You can skip the last step if you want to run on production ( ng build — prod).

Thank you ✨✨

Happy coding !!

--

--