问题
I have developed a simple Angular app built using Angular CLI that is designed to be embedded within third party websites. It works fine on a demo site in production mode.
However, when the app is included within a website running on Squarespace i get the following error:
Uncaught d {__zone_symbol__error: Error: Zone already loaded.
at d (https://static1.squarespace.com/static/5804a95d5016e1b3e34d642…}
I have ensured that my packaged Angular app script is only being included once.
I can only presume that the Squarespace CMS is already including the Zone.js library for some reason with one on their scripts?
How can i prevent this kind of conflict? Surely it must be possible to run an Angular2 app along side other scripts that could possibly use the Zone.js dependency?
If anyone can shed any light on this, that would be much appreciated.
Running: Angular @ 2.4.0 zone.js @ 0.7.7
Thanks!
来源:https://stackoverflow.com/questions/42539516/how-can-i-overcome-error-zone-already-loaded-conflicts-with-angular