I created an angular element that I can call via an url like this: http://localhost:8080/elements/ExampleElement.js This element holds a component, that I want to use in another application.
In my application where I want to call the component, I established some lazy loading of components in my html, that is working fine:
<example-component *axLazyElement="http://localhost:8080/elements/ExampleElement.js"></example-component>
However, now I have the scenario, where I have the element component as a string:
"<example-component *axLazyElement="http://localhost:8080/elements/ExampleElement.js">"
and I want to load it in my component with the string. I dont have the opportunity to get the tag "example-component" and the url "http://localhost:8080/elements/ExampleElement.js" singly. My first idea was to do it with innerHtml, but innerHtml is only working for some predefined tags.
So do you have any idea, how I can load my Example-component that is given by a string?
I am using Angular 12.2.6.
Thank you for your help!