Browse Source

update modal.component

pull/19858/head
masumulu28 2 years ago
parent
commit
7b136bbeb0
  1. 12
      npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.ts

12
npm/ng-packs/packages/theme-shared/src/lib/components/modal/modal.component.ts

@ -32,13 +32,13 @@ export type ModalSize = 'sm' | 'md' | 'lg' | 'xl';
providers: [SubscriptionService], providers: [SubscriptionService],
}) })
export class ModalComponent implements OnInit, OnDestroy, DismissableModal { export class ModalComponent implements OnInit, OnDestroy, DismissableModal {
private confirmationService = inject(ConfirmationService); protected readonly confirmationService = inject(ConfirmationService);
private modal = inject(NgbModal); protected readonly modal = inject(NgbModal);
private modalRefService = inject(ModalRefService); protected readonly modalRefService = inject(ModalRefService);
private suppressUnsavedChangesWarningToken = inject(SUPPRESS_UNSAVED_CHANGES_WARNING, { protected readonly suppressUnsavedChangesWarningToken = inject(SUPPRESS_UNSAVED_CHANGES_WARNING, {
optional: true, optional: true,
}); });
private destroyRef = inject(DestroyRef); protected readonly destroyRef = inject(DestroyRef);
visible = model<boolean>(false); visible = model<boolean>(false);
@ -108,7 +108,7 @@ export class ModalComponent implements OnInit, OnDestroy, DismissableModal {
} }
} }
private toggle(value: boolean) { protected toggle(value: boolean) {
this.visible.set(value); this.visible.set(value);
if (!value) { if (!value) {

Loading…
Cancel
Save