@@ -53,7 +53,15 @@ export abstract class _NativeDialogBase<C extends NativeModalRef> implements OnD
53
53
return parent ? parent . _getAfterAllClosed ( ) : this . _afterAllClosedAtThisLevel ;
54
54
}
55
55
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
+ ) { }
57
65
58
66
/**
59
67
* Opens a modal dialog containing the given component.
@@ -76,7 +84,7 @@ export abstract class _NativeDialogBase<C extends NativeModalRef> implements OnD
76
84
open < T , D = any , R = any > ( componentOrTemplateRef : ComponentType < T > | TemplateRef < T > , config ?: NativeDialogConfig < D > ) : NativeDialogRef < T , R > {
77
85
config = _applyConfigDefaults ( config , this . _defaultOptions || new NativeDialogConfig ( ) ) ;
78
86
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 ) ) {
80
88
throw Error ( `Dialog with id "${ config . id } " exists already. The dialog id must be unique.` ) ;
81
89
}
82
90
const dialogRef = this . _attachDialogContent < T , R > ( componentOrTemplateRef , config ) ;
@@ -141,7 +149,7 @@ export abstract class _NativeDialogBase<C extends NativeModalRef> implements OnD
141
149
// detachedLoaderRef.instance.createTemplatePortal(options.templateRef);
142
150
nativeModalRef . attachTemplatePortal (
143
151
// 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 } ) ,
145
153
) ;
146
154
} else {
147
155
const injector = this . _createInjector < T > ( config , dialogRef ) ;
0 commit comments