title: how to use parent module component in child module component in angular2
body: <p>I have header that should be used in both child and parent module.that was imported and used in parent module but when try to import and using in child component it showing error.I mean how to use common header for both parent and child module</p>
  
  <blockquote>
    <p>Uncaught (in promise): Error:</p>
    
    <p>Type HeaderComponent is part of the
    declarations of 2 modules: AppModule and ProviderModule! Please
    consider moving HeaderComponent to a higher module that imports
    AppModule and ProviderModule.</p>
    
    <p>You can also create a new NgModule that exports and includes
    HeaderComponent then import that NgModule in AppModule and
    ProviderModule.</p>
  </blockquote>