Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Angular App Empty Page in IE but works in Chrome

Tags:

angular

I have started learning Angular 4 and wrote a default application using Angular CLI (NG New HelloWorld). When i write ng serve, and browse to http://localhost:4200/, the page loads fine in Chrome, However in IE-Edge, it opens up as an empty page. there is an error in the console window of IE which is SCRIPT5022: Exception thrown and not caught File: polyfills.bundle.js, Line: 859, Column: 36. Is this expected?

Screenshot of Empty Page in Internet Explorer

Internet Explorer = Edge

Screenshot of How it loads in Chrome

Chrome

like image 278
Baahubali Avatar asked Oct 10 '17 01:10

Baahubali


People also ask

Why Angular app is not working in IE?

There can be numerous reasons why your Angular application is not working, including: Missing polyfills in polyfills. ts . Using a TypeScript target version which IE11 does not support.

How do I make Angular app compatible with IE?

There are two ways you can support IE 11 with Angular 12 as you prepare to migrate to Angular 13: Update tsconfig. json to use ES5 and update polyfills. ts for ES6/ES7.

Is Angular compatible with IE?

The Angular team is deprecating support for Internet Explorer 11 in Angular v12 (to be released in May 2021 and supported through November 2022), and plans to remove support for this browser in Angular v13 (late 2021).

How do I debug Angular in IE?

in IE 11 you need to open your . ts file in debugger it found under "Dynamic Scripts". scroll down to and locate your . ts file and open it in debug.


1 Answers

I'm running angular 8 application in windows 10 with IE11.

I tried many solutions from stackoverflow. But didn't worked anything. then i tried same solutions separately, then i got to one conclusion.

This is my final solution. i don't for howmany people it will work. but for me it worked.

1. tsconfig.json

"target": "es2015"

changed to

"target": "es5"

2. Restart your applications. this Mandatory.

like image 114
Arunkumar Chinthapalli Avatar answered Sep 16 '22 16:09

Arunkumar Chinthapalli