title: Angular Material cannot be loaded in a new module
body: <p>I created an angular material module (like a core module).</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { NgModule} from '@angular
  import {MatCheckboxModule} from '@angular/material/checkbox';
  
  
  @NgModule({
    imports: [
      MatCheckboxModule
    ],
    exports: [
      MatCheckboxModule
    ],
  })
  export class MaterialModule { }</code></pre>
  </div>
  </div>
  </p>
  
  <p>And I want to add this module to another module:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>import { NgModule} from '@angular/core';
  
  import { TestModuleRoutingModule } from './test-module-routing.module';
  import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
  import { BrowserModule } from '@angular/platform-browser';
  import { MaterialModule } from '../material/';
  import { ModuleIntTestComponent } from './module-int-test/module-int-test.component';
  
  
  @NgModule({
    imports: [
      BrowserModule,
      TestModuleRoutingModule,
      BrowserAnimationsModule,
      MaterialModule
    ],
    exports: [
      MaterialModule
    ],
    declarations: [ModuleIntTestComponent],
  })
  export class TestModuleModule { }</code></pre>
  </div>
  </div>
  </p>
  
  <p>Then inside the <strong>ModuleIntTestComponent</strong> i want to use the angular material checkbox.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;p&gt;module-int-test works!&lt;/p&gt;
  &lt;mat-checkbox class="example-margin"&gt;Checked&lt;/mat-checkbox&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>but I get the following error:</p>
  
  <pre><code>***ERROR in src/app/test-module/module-int-test/module-int-test.component.html:3:1 - error NG8001: 'mat-checkbox' is not a known element:
  1. If 'mat-checkbox' is an Angular component, then verify that it is part of this module.
  2. If 'mat-checkbox' is a Web Component then add 'CUSTOM_ELEMENTS_SCHEMA' to the '@NgModule.schemas' of this component to suppress this message.
  3 &lt;mat-checkbox class="example-margin"&gt;Checked&lt;/mat-checkbox&gt;
  
   src/app/test-module/module-int-test/module-int-test.component.ts:6:16
     6   templateUrl: './module-int-test.component.html',
     Error occurs in the template of component ModuleIntTestComponent.***
  </code></pre>
  
  <p>What is missing or what is wrong?</p>
  
  <p>I cannot understand.</p>
  
  <p>Note: If I add my MaterialModule to the AppModule I can use without any issue the Material Checkbox in any component of the AppModule. </p>