@@ -53,7 +53,15 @@ export abstract class _NativeDialogBase<C extends NativeModalRef> implements OnD
5353 return parent ? parent . _getAfterAllClosed ( ) : this . _afterAllClosedAtThisLevel ;
5454 }
5555
56- constructor ( private _injector : Injector , private _defaultOptions : NativeDialogConfig | undefined , private _parentDialog : _NativeDialogBase < C > | undefined , private _dialogRefConstructor : Type < NativeDialogRef < any > > , private _nativeModalType : Type < C > , private _dialogDataToken : InjectionToken < any > , private locationStrategy : NSLocationStrategy ) { }
56+ constructor (
57+ private _injector : Injector ,
58+ private _defaultOptions : NativeDialogConfig | undefined ,
59+ private _parentDialog : _NativeDialogBase < C > | undefined ,
60+ private _dialogRefConstructor : Type < NativeDialogRef < any > > ,
61+ private _nativeModalType : Type < C > ,
62+ private _dialogDataToken : InjectionToken < any > ,
63+ private locationStrategy : NSLocationStrategy ,
64+ ) { }
5765
5866 /**
5967 * Opens a modal dialog containing the given component.
@@ -76,7 +84,7 @@ export abstract class _NativeDialogBase<C extends NativeModalRef> implements OnD
7684 open < T , D = any , R = any > ( componentOrTemplateRef : ComponentType < T > | TemplateRef < T > , config ?: NativeDialogConfig < D > ) : NativeDialogRef < T , R > {
7785 config = _applyConfigDefaults ( config , this . _defaultOptions || new NativeDialogConfig ( ) ) ;
7886
79- if ( config . id && this . getDialogById ( config . id ) && ( typeof global . ngDevMode === 'undefined' || global . ngDevMode ) ) {
87+ if ( config . id && this . getDialogById ( config . id ) && ( typeof ngDevMode === 'undefined' || ngDevMode ) ) {
8088 throw Error ( `Dialog with id "${ config . id } " exists already. The dialog id must be unique.` ) ;
8189 }
8290 const dialogRef = this . _attachDialogContent < T , R > ( componentOrTemplateRef , config ) ;
@@ -141,7 +149,7 @@ export abstract class _NativeDialogBase<C extends NativeModalRef> implements OnD
141149 // detachedLoaderRef.instance.createTemplatePortal(options.templateRef);
142150 nativeModalRef . attachTemplatePortal (
143151 // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
144- new TemplatePortal < T > ( componentOrTemplateRef , null ! , < any > { $implicit : config . data , dialogRef } )
152+ new TemplatePortal < T > ( componentOrTemplateRef , null ! , < any > { $implicit : config . data , dialogRef } ) ,
145153 ) ;
146154 } else {
147155 const injector = this . _createInjector < T > ( config , dialogRef ) ;
0 commit comments