4
私は、アプリケーションで動的にコンポーネントを読み込むために以下のコードを使用しました。ご存知のように、compileComponentAsyncはRC6では廃止されました。私は同様の解決策を探したい。おそらく、私はcompileModuleAsyncを使うべきです。しかし、私は何かを見つけることができませんでした。誰にもアイデアはありますか?動的コンポーネント読み込みのための非推奨compileComponentAsyncと同等
this.compiler.compileComponentAsync(component)
.then(factory => {
const injector = ReflectiveInjector.fromResolvedProviders([], this.vcRef.parentInjector);
this.vcRef.createComponent(factory, 0, injector, []);
... ...
も参照してください。http://stackoverflow.com/questions/38888008/how-can-i-use-create-dynamic-template-to-compile-component-with-angular2-rc5/38888009#38888009 –