File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
nativescript-angular/directives Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -18,15 +18,16 @@ import { AppHostView } from "../app-host-view";
18
18
import { DetachedLoader } from "../common/detached-loader" ;
19
19
import { PageFactory , PAGE_FACTORY } from "../platform-providers" ;
20
20
import { once } from "../common/utils" ;
21
- import { topmost , Frame , ShowModalOptions } from "tns-core-modules/ui/frame" ;
21
+ import { topmost , Frame } from "tns-core-modules/ui/frame" ;
22
+ import { ShowModalOptions } from "tns-core-modules/ui/core/view" ;
22
23
23
24
export type BaseShowModalOptions = Pick < ShowModalOptions , Exclude < keyof ShowModalOptions , "closeCallback" | "context" > > ;
24
25
25
26
export interface ModalDialogOptions extends BaseShowModalOptions {
26
27
context ?: any ;
27
28
viewContainerRef ?: ViewContainerRef ;
28
29
moduleRef ?: NgModuleRef < any > ;
29
- sourceView ?: ElementRef ;
30
+ target ?: View ;
30
31
}
31
32
32
33
export class ModalDialogParams {
@@ -62,9 +63,10 @@ export class ModalDialogService {
62
63
}
63
64
64
65
let parentView = options . viewContainerRef . element . nativeElement ;
65
- if ( options . sourceView ) {
66
- parentView = options . sourceView . nativeElement ;
66
+ if ( options . target ) {
67
+ parentView = options . target ;
67
68
}
69
+
68
70
if ( parentView instanceof AppHostView && parentView . ngAppRoot ) {
69
71
parentView = parentView . ngAppRoot ;
70
72
}
You can’t perform that action at this time.
0 commit comments