How to fix Angular not working in IE11?

Sometimes, we want to fix Angular not working in IE11.

In this article, we’ll look at how to fix Angular not working in IE11.

How to fix Angular not working in IE11?

To fix Angular not working in IE11, we need to add a few polyfills.

To add them, in polyfills.ts, we uncomment a few lines.

After uncommenting the lines, we should get something like

/***************************************************************************************************
 * BROWSER POLYFILLS
 */

/** IE9, IE10 and IE11 requires all of the following polyfills. **/
 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/set';

in the file to enable all the polyfills for IE.

We should also downgrade our build target to es5 in tsconfig.json.

Conclusion

To fix Angular not working in IE11, we need to add a few polyfills.

To add them, in polyfills.ts, we uncomment a few lines.