I'm using third party js tool, which inject some html code into the page, as far as I know it using runOutsideAngular.
I need to find one of the element of that generated content and inject my component into it.
What I'm trying to do is
const element=document.getElementById("page");
const factory = this.componentFactoryResolver.resolveComponentFactory(MyComponent);
const ref = factory.create(this.injector, [],element);
this.applicationRef.attachView(ref.hostView);
But this code doesn't work because that "page" element isn't tracked by angular. (If I inject my component into any tag defined in angular template it works)
How can I achieve this?