I am using *ngIf
with async
pipe to show and hide HTML elements. It works on Google Chrome or Firefox. But it doesn\'t work on Internet Explorer, how c
It seems that the project you provide can work well in IE 11. It shows "Successfull Message" in all browsers. Is there any error in console when it doesn't work in IE? Have you followed the steps of supporting Angular 8 in IE 11?
You need to follow the following steps to make Angular 8 app run in IE 11:
Create a new tsconfig tsconfig-es5.app.json
next to tsconfig.app.json
with the below contents:
{
"extends": "./tsconfig.app.json",
"compilerOptions": {
"target": "es5"
}
}
In angular.json
add two new configuration section under the build
and serve
target to provide a new tsconfig:
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
...
},
"configurations": {
"production": {
...
},
"es5": {
"tsConfig": "./tsconfig-es5.app.json"
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
...
},
"configurations": {
"production": {
...
},
"es5": {
"browserTarget": "yourAppName:build:es5"
}
}
},
Run the serve with this configuration using the below command:
ng serve --configuration es5