@@ -20,6 +20,8 @@ import { PageFactory, PAGE_FACTORY } from "../platform-providers";
20
20
export interface ModalDialogOptions {
21
21
context ?: any ;
22
22
fullscreen ?: boolean ;
23
+ animated ?: boolean ;
24
+ stretched ?: boolean ;
23
25
viewContainerRef ?: ViewContainerRef ;
24
26
moduleRef ?: NgModuleRef < any > ;
25
27
}
@@ -36,6 +38,8 @@ interface ShowDialogOptions {
36
38
context : any ;
37
39
doneCallback ;
38
40
fullscreen : boolean ;
41
+ animated : boolean ;
42
+ stretched : boolean ;
39
43
pageFactory : PageFactory ;
40
44
parentView : ViewBase ;
41
45
resolver : ComponentFactoryResolver ;
@@ -48,7 +52,7 @@ export class ModalDialogService {
48
52
}
49
53
50
54
public showModal ( type : Type < any > ,
51
- { viewContainerRef, moduleRef, context, fullscreen } : ModalDialogOptions
55
+ { viewContainerRef, moduleRef, context, fullscreen, animated , stretched } : ModalDialogOptions
52
56
) : Promise < any > {
53
57
if ( ! viewContainerRef ) {
54
58
throw new Error (
@@ -77,6 +81,8 @@ export class ModalDialogService {
77
81
context,
78
82
doneCallback : resolve ,
79
83
fullscreen,
84
+ animated,
85
+ stretched,
80
86
pageFactory,
81
87
parentView,
82
88
resolver,
@@ -90,6 +96,8 @@ export class ModalDialogService {
90
96
context,
91
97
doneCallback,
92
98
fullscreen,
99
+ animated,
100
+ stretched,
93
101
pageFactory,
94
102
parentView,
95
103
resolver,
@@ -132,7 +140,9 @@ export class ModalDialogService {
132
140
( < any > componentView . parent ) . removeChild ( componentView ) ;
133
141
}
134
142
135
- parentView . showModal ( componentView , context , closeCallback , fullscreen ) ;
143
+ // TODO: remove <any> cast after https://github.com/NativeScript/NativeScript/pull/5734
144
+ // is in a published version of tns-core-modules.
145
+ ( < any > parentView ) . showModal ( componentView , context , closeCallback , fullscreen , animated , stretched ) ;
136
146
} ) ;
137
147
}
138
148
}
0 commit comments