import { NgModule } from '@angular/core' ; import { CommonModule } from '@angular/common' ; import { MatToolbarModule , MatSidenavModule , MatIconModule , MatButtonModule , MatCardModule , MatListModule , MatGridListModule , MatDividerModule , MatFormFieldModule , MatInputModule , MatSelectModule , MatChipsModule } from '@angular/material' ; import { RouterModule } from '@angular/router' ; import { ReactiveFormsModule } from '@angular/forms' ; const materialModules = [ MatSidenavModule , MatToolbarModule , MatIconModule , MatButtonModule , MatCardModule , MatListModule , MatGridListModule , MatDividerModule , MatFormFieldModule , MatInputModule , MatSelectModule , MatChipsModule , RouterModule , ReactiveFormsModule ] ; @ NgModule ( { declarations : [ ] , imports : [ CommonModule , ... materialModules ] , exports : [ ... materialModules ] } ) export class SharedModule { }