How can i overcome 'Error: Zone already loaded' conflicts with Angular?

岁酱吖の 提交于 2019-12-11 04:56:57

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!