title: create component dynamically with compileModuleAndAllComponentsSync from Module
body: <p>I´m trying to dynamically import components from a module without explicitly importing all components individual.
  The module consists of two sub modules with each having a component inside.</p>
  
  <p>I have no clue how to create the components from the list of factories which I get from <code>compileModuleAndAllComponentsSync(ExampleModule)</code>.<br>
  Here is my code:  </p>
  
  <p><strong>app.component.html</strong>  </p>
  
  <pre><code>&lt;ng-container *ngComponentOutlet="myComponent;
                                      ngModuleFactory: myModule;"&gt;
  &lt;/ng-container&gt;
  </code></pre>
  
  <p><strong>app.component.ts</strong></p>
  
  <pre><code>import { Component, Compiler } from '@angular/core';
  import { ExampleModule } from '@example/example.module';
  
  @Component({
    selector: 'app-root',
    templateUrl: './app.component.html',
    styleUrls: ['./app.component.css']
  })
  export class AppComponent {
  
    private myModule: any;
    private myComponent: any;
  
    constructor(private compiler: Compiler) {
      const componentList = this.compiler.compileModuleAndAllComponentsSync(ExampleModule);
      // const componentList = this.compiler.compileModuleSync(ExampleModule);
      console.log(componentList);
  
      this.myModule = null; //&lt;-- What goes here...
      this.myComponent = null; //&lt;--...and here?
    }
  }
  </code></pre>
  
  <p><strong>app.module.ts</strong></p>
  
  <pre><code> import { BrowserModule } from '@angular/platform-browser';
      import { NgModule } from '@angular/core';
  
      import { AppComponent } from './app.component';
      import { ExampleModule } from '@example/example.module';
  
  
      @NgModule({
        declarations: [
          AppComponent
        ],
        imports: [
          BrowserModule,
          ExampleModule
  
    ],
    providers: [],
    bootstrap: [AppComponent]
  })
  export class AppModule { }
  </code></pre>
  
  <p><strong>How can I create the components dynamically from my module?</strong></p>