title: TS2345: Argument of type '{ selector: string; template: {}; styles: {}[]; }' is not assignable to parameter of type 'Component'
body: <p>this error happen with Asp.net core 2 and angular 4 after running the application in seconds </p>
  
  <p>angular CLI:</p>
  
  <pre><code>Angular CLI: 1.7.0
  Node: 6.11.3
  OS: win32 x64
  Angular: 4.2.5
  ... animations, common, compiler, compiler-cli, core, forms
  ... http, platform-browser, platform-browser-dynamic
  ... platform-server, router, tsc-wrapped
  
  @angular/cli: 1.7.0
  @angular-devkit/build-optimizer: 0.3.1
  @angular-devkit/core: 0.3.1
  @angular-devkit/schematics: 0.3.1
  @ngtools/json-schema: 1.2.0
  @ngtools/webpack: 1.5.0
  @schematics/angular: 0.3.1
  @schematics/package-update: 0.3.1
  typescript: 2.3.4
  webpack-hot-middleware: 2.18.2`enter code here`
  webpack-merge: 4.1.0
  webpack: 2.5.1
  </code></pre>
  
  <hr>
  
  <pre><code>app.shared.module:
  
  import { NgModule } from '@angular/core';
  import { CommonModule } from '@angular/common';
  import { FormsModule } from '@angular/forms';
  import { HttpModule } from '@angular/http';
  import { RouterModule } from '@angular/router';
  
  import { AppComponent } from './components/app/app.component';
  import { NavMenuComponent } from './components/navmenu/navmenu.component';
  import { HomeComponent } from './components/home/home.component';
  import { FetchDataComponent } from './components/fetchdata/fetchdata.component';
  import { CounterComponent } from './components/counter/counter.component';
  import { VehicleFormComponent } from './components/vehicle-form/vehicle-form.component';
  
  @NgModule({
      declarations: [
          AppComponent,
          NavMenuComponent,
          CounterComponent,
          FetchDataComponent,
          HomeComponent,
          VehicleFormComponent
      ],
      imports: [
          CommonModule,
          HttpModule,
          FormsModule,
          RouterModule.forRoot([
              { path: '', redirectTo: 'home', pathMatch: 'full' },
              { path: 'vehicles/new', component: VehicleFormComponent },
              { path: 'home', component: HomeComponent },
              { path: 'counter', component: CounterComponent },
              { path: 'fetch-data', component: FetchDataComponent },
              { path: '**', redirectTo: 'home' }
          ])
      ]
  })
  export class AppModuleShared {
  }
  </code></pre>
  
  <hr>
  
  <p>ouput error : </p>
  
  <blockquote>
    <p>ERROR in [at-loader] ./ClientApp/app/components/app/app.component.ts:3:12 
        TS2345: Argument of type '{ selector: string; template: {}; styles: {}[]; }' is not assignable to parameter of type 'Component'.
      Types of property 'template' are incompatible.
        Type '{}' is not assignable to type 'string | undefined'.
          Type '{}' is not assignable to type 'string'.</p>
    
    <p>ERROR in [at-loader] ./ClientApp/app/components/counter/counter.component.ts:3:12 
        TS2345: Argument of type '{ selector: string; template: {}; }' is not assignable to parameter of type 'Component'.
      Types of property 'template' are incompatible.
        Type '{}' is not assignable to type 'string | undefined'.
          Type '{}' is not assignable to type 'string'.</p>
    
    <p>ERROR in [at-loader] ./ClientApp/app/components/fetchdata/fetchdata.component.ts:4:12 
        TS2345: Argument of type '{ selector: string; template: {}; }' is not assignable to parameter of type 'Component'.
      Types of property 'template' are incompatible.
        Type '{}' is not assignable to type 'string | undefined'.
          Type '{}' is not assignable to type 'string'.</p>
    
    <p>ERROR in [at-loader] ./ClientApp/app/components/home/home.component.ts:3:12 
        TS2345: Argument of type '{ selector: string; template: {}; }' is not assignable to parameter of type 'Component'.
      Types of property 'template' are incompatible.
        Type '{}' is not assignable to type 'string | undefined'.
          Type '{}' is not assignable to type 'string'.</p>
    
    <p>ERROR in [at-loader] ./ClientApp/app/components/navmenu/navmenu.component.ts:3:12 
        TS2345: Argument of type '{ selector: string; template: {}; styles: {}[]; }' is not assignable to parameter of type 'Component'.
      Types of property 'template' are incompatible.
        Type '{}' is not assignable to type 'string | undefined'.
          Type '{}' is not assignable to type 'string'.</p>
    
    <p>ERROR in [at-loader] ./ClientApp/app/components/vehicle-form/vehicle-form.component.ts:3:12 
        TS2345: Argument of type '{ selector: string; template: {}; styles: {}[]; }' is not assignable to parameter of type 'Component'.
      Types of property 'template' are incompatible.
        Type '{}' is not assignable to type 'string | undefined'.</p>
    
    <h2>      Type '{}' is not assignable to type 'string'.</h2>
  </blockquote>
  
  <p>error image:</p>
  
  <p><img src="https://i.stack.imgur.com/HBD5F.png" alt="Bug Feature"></p>