I used the code below to load dynamically components in my application. As you know, compileComponentAsync is deprecated in RC6. I want to find a similar solution. Maybe I should use compileModuleAsync. But I could not find anything. Does anyone have an idea?
this.compiler.compileComponentAsync(component)
.then(factory => {
const injector = ReflectiveInjector.fromResolvedProviders([], this.vcRef.parentInjector);
this.vcRef.createComponent(factory, 0, injector, []);
... ...
source
share