title: Angular 4: no component factory found,did you add it to @NgModule.entryComponents?
body: <p>I'm using Angular 4 template with webpack
  and I have this error when I try to use a component (ConfirmComponent):</p>
  
  <blockquote>
    <p>No component factory found for ConfirmComponent.  Did you add it to
    @NgModule.entryComponents?</p>
  </blockquote>
  
  <p>The component is declared in <code>app.module.server.ts</code></p>
  
  <pre class="lang-js prettyprint-override"><code>@NgModule({
    bootstrap: [ AppComponent ],
    imports: [
      // ...
    ],
    entryComponents: [
      ConfirmComponent,
    ],
  })
  export class AppModule { }
  </code></pre>
  
  <p>I have also  <code>app.module.browser.ts</code> and <code>app.module.shared.ts</code></p>
  
  <p>How can I fix that?</p>