title: Unable To Add Angular Material To Angular Custom Library
body: <p>I want to build a custom library based on angular material library so i added angular material to my angular project and tested material components in my components it worked well. But after i tried to use angular material in library created VIA ng generate library then i was flooded with errors.</p>
  
  <p>Errors:</p>
  
  <pre><code>BUILD ERROR
  : Can't bind to 'ngForOf' since it isn't a known property of 'mat-tab'.
  1. If 'mat-tab' is an Angular component and it has 'ngForOf' input, then verify that it is part of this module.
  2. If 'mat-tab' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  3. To allow any property add 'NO_ERRORS_SCHEMA' to the '@NgModule.schemas' of this component. ("&lt;div class="pwc-tabs"&gt;
    &lt;mat-tab-group disableRipple&gt;
      &lt;mat-tab  [ERROR -&gt;]*ngFor="let tab of tabContent" label="{{tab.title}}"&gt; {{tab.content}} &lt;/mat-tab&gt;
    &lt;/mat-tab-group&gt;
  
  ")
  </code></pre>
  
  <p>i tried to add material modules in library imports and exports nothing worked</p>
  
  <p>tabs.module.ts</p>
  
  <pre><code>import { NgModule } from '@angular/core';
  import { TabsComponent } from './tabs.component';
  import { MatTabsModule } from '@angular/material/tabs';
  import { MatExpansionModule } from '@angular/material/expansion';
  
  @NgModule({
    declarations: [TabsComponent],
    imports: [
      MatTabsModule,
      MatExpansionModule
    ],
    exports: [
      MatTabsModule,
      MatExpansionModule,
      TabsComponent
    ]
  })
  export class TabsModule { }
  </code></pre>
  
  <p>tabs.html</p>
  
  <pre><code>&lt;div class="tabs"&gt;
    &lt;mat-tab-group disableRipple&gt;
      &lt;mat-tab  *ngFor="let tab of tabContent" label="{{tab.title}}"&gt; {{tab.content}} &lt;/mat-tab&gt;
    &lt;/mat-tab-group&gt;
  
    &lt;mat-expansion-panel #tabsExpansionPanel&gt;
      &lt;mat-expansion-panel-header&gt;
        &lt;mat-panel-description&gt;
          &lt;i *ngIf="!tabsExpansionPanel.expanded" class="material-icons expansion-panel-icons"&gt;
            keyboard_arrow_down
          &lt;/i&gt;
          &lt;i *ngIf="tabsExpansionPanel.expanded" class="material-icons expansion-panel-icons"&gt;
            keyboard_arrow_up
          &lt;/i&gt;
        &lt;/mat-panel-description&gt;
      &lt;/mat-expansion-panel-header&gt; 
    &lt;/mat-expansion-panel&gt;
  &lt;/div&gt;
  </code></pre>