Angular App Empty Page in IE but works in Chrome

后端 未结 4 2253
情歌与酒
情歌与酒 2021-02-19 10:26

I have started learning Angular 4 and wrote a default application using Angular CLI (NG New HelloWorld). When i write ng serve, and browse

4条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-19 10:45

    step 1:

    Include or uncomment the below lines in pollyfills.ts below which is under src folder
    
    
    > import 'classlist.js';  import 'web-animations-js'; (window as
    > any).__Zone_enable_cross_context_check = true; import
    > 'zone.js/dist/zone';
    

    Step 2:

    Run `npm install --save classlist.js`. 
    Run `npm install --save web-animations-js`.
    

    Step 3:change the value of target from es2015 to es5 in your tsconfig.json file as below

    "target": "es5",

    Step 4:

    Restart your application by doing ng serve
    

提交回复
热议问题