title: Angular 2 final version - ngModule does not recognize shared component
body: <p>I am having problems with the configuration for ngModule and my components, running final released version of Angular 2.</p>
  
  <p>this is what I have:</p>
  
  <pre><code>//PageHeaderModule
  
  import { NgModule } from '@angular/core';
  import { CommonModule } from '@angular/common';
  import { PageHeaderComponent } from './index';
  
  
  @NgModule({
    imports: [CommonModule],
    declarations: [PageHeaderComponent]
  })
  
  
  export class PageHeaderModule { }
  </code></pre>
  
  <hr>
  
  <pre><code>//Shared Module
  
  import { NgModule } from '@angular/core';
  import { CommonModule } from '@angular/common';
  import { FormsModule } from '@angular/forms';
  
  import { Routes, RouterModule } from '@angular/router';
  
  import { HeaderComponent, SideBarComponent, BurgerMenuComponent, FooterComponent, InnerSpinnerComponent, PageHeaderComponent  } from "./components/index";
  import { UniqueNameValidationByList } from "./directives/index";
  import { LowerCasePipe, WhitespacePipe } from "./pipes/index";
  
  @NgModule({
      imports: [CommonModule, RouterModule],
      declarations: [
          PageHeaderComponent,
          HeaderComponent,
          SideBarComponent,
          BurgerMenuComponent,
          FooterComponent,
          InnerSpinnerComponent,
          UniqueNameValidationByList,
          LowerCasePipe, WhitespacePipe
      ],
      exports: [
          PageHeaderComponent,
          HeaderComponent,
          SideBarComponent,
          BurgerMenuComponent,
          FooterComponent,
          InnerSpinnerComponent,
          UniqueNameValidationByList,
          LowerCasePipe, WhitespacePipe
      ],
  })
  
  export class SharedModule { }
  </code></pre>
  
  <hr>
  
  <pre><code>//AppModule 
  
  import { NgModule }      from '@angular/core';
  import { BrowserModule } from '@angular/platform-browser';
  import { Routes, RouterModule } from '@angular/router';
  import { LocationStrategy, HashLocationStrategy } from '@angular/common';
  
  import { routing, appRoutes }  from './app.routes';
  import { AppComponent }   from './app.component';
  
  
  import { BillingModule }  from './billing/billing.module';
  import { CustomersModule }  from './customers/customers.module';
  import { DashboardModule }  from './dashboard/dashboard.module';
  import { DevicesModule }  from './devices/devices.module';
  import { GroupsModule }  from './groups/groups.module';
  import { ProductsModule }  from './products/products.module';
  import { ReportingModule }  from './reporting/reporting.module';
  import { LoginModule }  from './login/login.module';
  
  import { SharedModule } from "./shared/shared.module";
  
  
  import { SideBarService } from "./shared/components/index";
  import { SignalRService, CountriesService } from "./shared/services/index";
  
  
  @NgModule({
      imports: [BrowserModule,
          RouterModule.forRoot(appRoutes, { useHash: true }),
          routing,
          SharedModule,
          BillingModule,
          CustomersModule,
          DashboardModule,
          DevicesModule,
          GroupsModule,
          ProductsModule,
          ReportingModule,
          LoginModule
      ],
      declarations: [AppComponent],
      providers: [{ provide: LocationStrategy, useClass: HashLocationStrategy },
          SideBarService,
          SignalRService,
          CountriesService],
      bootstrap: [AppComponent],
  }) 
  
  export class AppModule { }
  </code></pre>
  
  <p>Notice 2 things in here: </p>
  
  <p>1) I am not using page header module because I think that the sharedModule should take care about all those shared components, instead create one by one, but I am not sure.</p>
  
  <p>2) I just use 'exports' in the shared module, not in any of the rest of the modules within my app</p>
  
  <p>The error I am getting is this one:</p>
  
  <p><a href="https://i.stack.imgur.com/U0E3j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/U0E3j.png" alt="enter image description here"></a></p>
  
  <p>I have been trying many things, but nothing seems to solve my problem, I would really appreciate whatever help you can provide.</p>
  
  <p>If more info needed, please just let me know.</p>
  
  <p>Thanks</p>