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";
1818import { DetachedLoader } from "../common/detached-loader" ;
1919import { PageFactory , PAGE_FACTORY } from "../platform-providers" ;
2020import { 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" ;
2223
2324export type BaseShowModalOptions = Pick < ShowModalOptions , Exclude < keyof ShowModalOptions , "closeCallback" | "context" > > ;
2425
2526export interface ModalDialogOptions extends BaseShowModalOptions {
2627 context ?: any ;
2728 viewContainerRef ?: ViewContainerRef ;
2829 moduleRef ?: NgModuleRef < any > ;
29- sourceView ?: ElementRef ;
30+ target ?: View ;
3031}
3132
3233export class ModalDialogParams {
@@ -62,9 +63,10 @@ export class ModalDialogService {
6263 }
6364
6465 let parentView = options . viewContainerRef . element . nativeElement ;
65- if ( options . sourceView ) {
66- parentView = options . sourceView . nativeElement ;
66+ if ( options . target ) {
67+ parentView = options . target ;
6768 }
69+
6870 if ( parentView instanceof AppHostView && parentView . ngAppRoot ) {
6971 parentView = parentView . ngAppRoot ;
7072 }
You can’t perform that action at this time.
0 commit comments