title: Nothing is being rendered if I add imports
body: <p>This is my component.ts :</p>
  
  <pre><code>@Component({
    selector: 'bancaComponent',
    template: `
                  &lt;ng-container #dynamicTemplate&gt;&lt;/ng-container&gt;
                `
  })
  export class BancaComponent implements AfterViewInit, OnInit {
    @ViewChild('dynamicTemplate', { read: ViewContainerRef, static: false }) dynamicTemplate;
    BarChartDataInput = [
      {
        "name": "Germany",
        "value": 40632,
        "extra": {
          "code": "de"
        }
      },
      {
        "name": "United States",
        "value": 50000,
        "extra": {
          "code": "us"
        }
      },
      {
        "name": "France",
        "value": 36745,
        "extra": {
          "code": "fr"
        }
      },
      {
        "name": "United Kingdom",
        "value": 36240,
        "extra": {
          "code": "uk"
        }
      },
      {
        "name": "Spain",
        "value": 33000,
        "extra": {
          "code": "es"
        }
      },
      {
        "name": "Italy",
        "value": 35800,
        "extra": {
          "code": "it"
        }
      }
    ];
    constructor(private _compiler: Compiler,
      private _injector: Injector,
      private _m: NgModuleRef&lt;any&gt;) {
    }
  
    ngAfterViewInit() {
  
      let myTemplateUrl = `&lt;p&gt;test&lt;/p&gt;`;
  
      const tmpCmp = Component({
        moduleId: module.id, template: myTemplateUrl
      })(class {
      });
      const tmpModule = NgModule({imports: [NgxChartsModule, BrowserModule, CommonModule, BrowserAnimationsModule]
        , declarations: [tmpCmp] })(class {
      });
  
      this._compiler.compileModuleAndAllComponentsAsync(tmpModule)
        .then((factories) =&gt; {
          const f = factories.componentFactories[0];
          const cmpRef = f.create(this._injector, [], null, this._m);
          cmpRef.instance.name = 'dynamic';
          this.dynamicTemplate.insert(cmpRef.hostView);
        });
    }
    ngOnInit() {
  
    }
  }
  </code></pre>
  
  <p>I want to render a dynamic template which has ngx-charts but in the NgModule I need to add required imports for the ngx-charts to work, if I remove the imports array then normal tags are being rendered but upon adding any imports nothing is being displayed and no error in console. How can I fix this?</p>