Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | 1x 1x | import { OverlayConfig, type OverlayRef } from '@angular/cdk/overlay';
import { InjectionToken, type Provider } from '@angular/core';
import { MAT_DATE_FORMATS, MAT_DATE_LOCALE } from '@angular/material/core';
import { MatIconRegistry } from '@angular/material/icon';
import { MAT_SNACK_BAR_DEFAULT_OPTIONS, type MatSnackBarConfig } from '@angular/material/snack-bar';
import { MAT_MOMENT_DATE_ADAPTER_OPTIONS } from '@angular/material-moment-adapter';
import { CUSTOM_DATE_FORMATS, matMomentDateAdapterOptionsFactory } from '../configs/mat-date/mat-date.config';
/**
* The overlay reference injection token.
*/
export const OVERLAY_REFERENCE = new InjectionToken<OverlayRef>('OverlayReference');
/**
* Shared application material module providers.
*/
export const appMaterialModuleProviders: Provider[] = [
MatIconRegistry,
{
provide: MAT_DATE_LOCALE,
useValue: 'en',
},
{
provide: MAT_SNACK_BAR_DEFAULT_OPTIONS,
useValue: {
duration: 3000,
politeness: 'polite',
} as MatSnackBarConfig,
},
{
provide: MAT_MOMENT_DATE_ADAPTER_OPTIONS,
useFactory: matMomentDateAdapterOptionsFactory,
},
{ provide: MAT_DATE_FORMATS, useValue: CUSTOM_DATE_FORMATS },
{
provide: OverlayConfig,
useFactory: () =>
new OverlayConfig({
direction: 'ltr',
}),
},
];
|