title: Share Component between 2 modules
body: <p>I'm trying to include a <code>Component</code> in 2 modules (parent and child) but getting various errors in the process</p>
  
  <p><strong>app.module.ts</strong> </p>
  
  <pre><code>@NgModule({
      declarations: [SharedComponent],
      exports: [SharedComponent]...
  })    
  </code></pre>
  
  <p><strong>child.module.ts</strong>  </p>
  
  <pre><code>@NgModule({
      imports: [SharedComponent], //Unexpected directive imported by module
  })  
  </code></pre>
  
  <p><strong>app.html</strong></p>
  
  <pre><code>&lt;div class="container"&gt;
      &lt;shared-selector&gt;&lt;/shared-selector&gt;
      &lt;child-selector&gt;&lt;/child-selector&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><strong>child.html</strong></p>
  
  <pre><code>&lt;div&gt;
      content
      &lt;shared-selector&gt;&lt;/shared-selector&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm loading the <em>ChildModule</em> in Async matter</p>
  
  <pre><code>loadChildren: 'app/child.module#ChildModule',
  </code></pre>
  
  <p>When not <code>importing</code> or <code>declaring</code> in the <code>ChildModule</code> I'm getting the error:</p>
  
  <pre><code>template parse error: shared-selector is not a known element
  </code></pre>
  
  <p>****** <strong>UPDATE</strong> *******</p>
  
  <p>when Creating <code>FeatureModule</code>, in order to work the <code>SharedModule</code> should export the Components...updateed code...</p>
  
  <p><strong>SharedModule</strong></p>
  
  <pre><code>@NgModule({
      imports: [
          CommonModule
       ],
      declarations: [
           SharedComponent
      ],
      exports: [
          SharedComponent
      ]
  })
  
  export class SharedModule {}
  </code></pre>
  
  <p><strong>app.module.ts</strong> </p>
  
  <pre><code>@NgModule({
      imports: [ChildModule, SharedModule],...
  })    
  </code></pre>
  
  <p><strong>child.module.ts</strong>  </p>
  
  <pre><code>@NgModule({
      imports: [SharedModule], //Unexpected directive imported by module
  })  
  </code></pre>