import { NgModule } from '@angular/core' ; import { MatInputModule } from '@angular/material/input' ; import { MatCardModule } from '@angular/material/card' ; import { MatButtonModule } from '@angular/material/button' ; import { MatListModule } from '@angular/material/list' ; import { MatIconModule } from '@angular/material/icon' ; import { MatToolbarModule } from '@angular/material/toolbar' ; import { MatDialogModule } from '@angular/material/dialog' ; import { MatFormFieldModule } from '@angular/material/form-field' ; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner' ; import { MatRadioModule } from '@angular/material/radio' ; import { MatExpansionModule } from '@angular/material/expansion' ; import { MatDividerModule } from '@angular/material/divider' ; import { MatDatepickerModule } from '@angular/material/datepicker' ; import { MatNativeDateModule , MAT_DATE_LOCALE , MAT_DATE_FORMATS , DateAdapter } from '@angular/material/core' ; import { MatProgressBarModule } from '@angular/material/progress-bar' ; import { MatChipsModule } from '@angular/material/chips' ; import { MatPaginatorModule } from '@angular/material/paginator' ; import { MatTableModule } from '@angular/material/table' ; import { MatSortModule } from '@angular/material/sort' ; import { MatRippleModule } from '@angular/material/core' ; import { MatButtonToggleModule } from '@angular/material/button-toggle' ; import { MatSelectModule } from '@angular/material/select' ; import { MatSlideToggleModule } from '@angular/material/slide-toggle' ; import { MatAutocompleteModule } from '@angular/material/autocomplete' ; import { MatTooltipModule } from '@angular/material/tooltip' ; import { NgxMaterialTimepickerModule } from 'ngx-material-timepicker' ; import { MomentDateAdapter } from '@angular/material-moment-adapter' ; import { PinchZoomModule } from 'ngx-pinch-zoom' ; export const MY_FORMATS = { parse : { dateInput : 'LL' , } , display : { dateInput : 'YYYY-MM-DD' , monthYearLabel : 'YYYY' , dateA11yLabel : 'LL' , monthYearA11yLabel : 'YYYY' , } , } ; @ NgModule ( { imports : [ MatInputModule , MatCardModule , MatButtonModule , MatListModule , MatIconModule , MatToolbarModule , MatProgressSpinnerModule , MatDialogModule , MatFormFieldModule , MatRadioModule , MatExpansionModule , MatDividerModule , MatDatepickerModule , NgxMaterialTimepickerModule , MatNativeDateModule , MatProgressBarModule , MatChipsModule , MatPaginatorModule , MatTableModule , MatSortModule , MatRippleModule , MatDialogModule , PinchZoomModule , MatButtonToggleModule , MatSelectModule , MatSlideToggleModule , MatAutocompleteModule , MatTooltipModule ] , exports : [ MatInputModule , MatCardModule , MatButtonModule , MatListModule , MatIconModule , MatToolbarModule , MatProgressSpinnerModule , MatDialogModule , MatFormFieldModule , MatRadioModule , MatExpansionModule , MatDividerModule , MatDatepickerModule , NgxMaterialTimepickerModule , MatNativeDateModule , MatProgressBarModule , MatChipsModule , MatPaginatorModule , MatTableModule , MatSortModule , MatRippleModule , PinchZoomModule , MatButtonToggleModule , MatSelectModule , MatSlideToggleModule , MatAutocompleteModule , MatTooltipModule ] , providers : [ { provide : MAT_DATE_LOCALE , useValue : 'zh-tw' } , { provide : DateAdapter , useClass : MomentDateAdapter , deps : [ MAT_DATE_LOCALE ] } , { provide : MAT_DATE_FORMATS , useValue : MY_FORMATS } , ] , } ) export class MaterialModule { }