30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
|
import { NgModule, ModuleWithProviders } from '@angular/core';
|
||
|
import { CommonModule } from '@angular/common';
|
||
|
|
||
|
import { MatButtonModule } from '@angular/material/button';
|
||
|
import { MatCardModule } from '@angular/material/card';
|
||
|
import { MatDialogModule } from '@angular/material/dialog';
|
||
|
|
||
|
import { BottomSheetService } from './services/bottom-sheet.service';
|
||
|
import { DialogService } from './services/dialog.service';
|
||
|
const SERVICES = [BottomSheetService, DialogService];
|
||
|
|
||
|
import { AlertDialogComponent } from './dialogs/alert.dialog.component';
|
||
|
import { ConfirmDialogComponent } from './dialogs/confirm.dialog.component';
|
||
|
const DIALOGS = [AlertDialogComponent, ConfirmDialogComponent];
|
||
|
|
||
|
@NgModule({
|
||
|
imports: [CommonModule, MatButtonModule, MatCardModule, MatDialogModule],
|
||
|
exports: [],
|
||
|
declarations: [...DIALOGS],
|
||
|
entryComponents: [...DIALOGS]
|
||
|
})
|
||
|
export class UCapUiModule {
|
||
|
public static forRoot(): ModuleWithProviders<UCapUiModule> {
|
||
|
return {
|
||
|
ngModule: UCapUiModule,
|
||
|
providers: [...SERVICES]
|
||
|
};
|
||
|
}
|
||
|
}
|