import {NgModule} from '@angular/core'; import {CommonModule} from '@angular/common'; import {EmployeeListComponent} from './employee-list/employee-list.component'; import {EmployeeDetailComponent} from './employee-detail/employee-detail.component'; import {EmployeeRoutingModule} from './employee-routing.module'; import { MatButtonModule } from '@angular/material/button'; import { MatCardModule } from '@angular/material/card'; import { MatCheckboxModule } from '@angular/material/checkbox'; import {DateAdapter, MAT_DATE_FORMATS, MAT_DATE_LOCALE, MatOptionModule} from '@angular/material/core'; import { MatDatepickerModule } from '@angular/material/datepicker'; import { MatDialogModule } from '@angular/material/dialog'; import { MatIconModule } from '@angular/material/icon'; import { MatInputModule } from '@angular/material/input'; import { MatPaginatorModule } from '@angular/material/paginator'; import { MatProgressSpinnerModule } from '@angular/material/progress-spinner'; import { MatSelectModule } from '@angular/material/select'; import { MatSortModule } from '@angular/material/sort'; import { MatTableModule } from '@angular/material/table'; import {CdkTableModule} from '@angular/cdk/table'; import {ReactiveFormsModule} from '@angular/forms'; import {FlexLayoutModule} from '@angular/flex-layout'; import {MomentDateAdapter} from "@angular/material-moment-adapter"; export const MY_FORMATS = { parse: { dateInput: 'DD-MMM-YYYY', }, display: { dateInput: 'DD-MMM-YYYY', monthYearLabel: 'MMM YYYY', dateA11yLabel: 'DD-MMM-YYYY', monthYearA11yLabel: 'MMM YYYY', }, }; @NgModule({ imports: [ CommonModule, CdkTableModule, FlexLayoutModule, MatTableModule, MatPaginatorModule, MatSortModule, MatCardModule, MatDatepickerModule, MatDialogModule, MatProgressSpinnerModule, MatInputModule, MatButtonModule, MatIconModule, MatOptionModule, MatSelectModule, MatCheckboxModule, ReactiveFormsModule, EmployeeRoutingModule ], declarations: [ EmployeeListComponent, EmployeeDetailComponent ], providers: [ {provide: DateAdapter, useClass: MomentDateAdapter, deps: [MAT_DATE_LOCALE]}, {provide: MAT_DATE_FORMATS, useValue: MY_FORMATS}, ] }) export class EmployeeModule { }