2

My Problem:

I am having an angular application which is part of larger CMS system embedded in iframe, there i have another angular application already hosted in header part of CMS. I am facing an issue in Internet explorer for zone.js as pollyfill.js file is loading two times one for each application.

Assumption: My assumption is that as header angular application loads its pollyfill then my second application load its pollyfill.js and it throws error as :

Zone.js has detected that ZoneAwarePromise (window|global).Promise has been overwritten. Most likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)

Please suggest an approach to deal with this situation or route me to correct article if already exist somewhere as i have not found relevant solution yet

What i tried so far: I have tried solution of using/creating custom webpack angular builders instead of default angular devkit builders referring one of an article but still not succeed. also have two different app root name for these application.

enter image description here

your help highly appreciated.

  • Which version of Angualr and zone.js are you using? I found some similar threads and you can refer to them. [This thread](https://stackoverflow.com/questions/46305424/unhandled-promise-rejection-windowglobal-promise-has-been-overwritten) says the error can be fixed by using zone.js 0.8.19. You can have a try or try the newest version of zone.js. [This thread](https://stackoverflow.com/questions/44566898/zoneawarepromise-overwritten-when-adding-handsontable-to-angular-cli-scripts) says it can be solved by moving `import 'zone.js/dist/zone'` from "polyfill.ts" into "main.ts". – Yu Zhou Aug 25 '20 at 05:49
  • I tried this solution but it didn't worked. can you please suggest something else @YuZhou – Abhijeet Aug 27 '20 at 09:02

0 Answers0