ERROR DOMException : Failed to execute 'define' on 'CustomElementRegisry' : the name “xyz” has already been used with this registry

血红的双手。 提交于 2021-01-29 20:12:40

问题


I have created two angular component with angular ~9.0.7 and I am using it to another angular application. if I use one component, everything work fine but if I use both angular component its giving error.

ERROR DOMException : Failed to execute 'define' on 'CustomElementRegisry' : the name "xyz" has already been used with this registry.

I tried below code but it's not working :

if (!customElements.get('the-element')) { customElements.define('the-element', HTMLTheElement); }

Please help.

来源:https://stackoverflow.com/questions/61364789/error-domexception-failed-to-execute-define-on-customelementregisry-the

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