Is it possible to use dynamically bootable application components depending on whether the element exists.
I would like something like ...
export class AppModule {
constructor() {
}
ngDoBootstrap(appRef: ApplicationRef) {
for(let component of components) {
if(document.querySelector(component.selector)){
appRef.bootstrap(component);
}
}
}
}
source
share