import { Injector } from '@angular/core' ; import { NzModalRef } from 'ng-zorro-antd/modal' ; import { AppComponentBase } from '@shared/common/app-component-base' ; export abstract class ModalComponentBase extends AppComponentBase { title = '' ; nzModalRef : NzModalRef ; constructor ( injector ) { super ( injector ) ; this . nzModalRef = injector . get ( NzModalRef ) ; } success ( result = true ) { if ( result ) { this . nzModalRef . close ( result ) ; } else { this . close ( ) ; } } close ( $event ? ) { this . nzModalRef . close ( ) ; } }