@@ -20,6 +20,8 @@ import { PageFactory, PAGE_FACTORY } from "../platform-providers";
2020export interface ModalDialogOptions {
2121 context ?: any ;
2222 fullscreen ?: boolean ;
23+ animated ?: boolean ;
24+ stretched ?: boolean ;
2325 viewContainerRef ?: ViewContainerRef ;
2426 moduleRef ?: NgModuleRef < any > ;
2527}
@@ -36,6 +38,8 @@ interface ShowDialogOptions {
3638 context : any ;
3739 doneCallback ;
3840 fullscreen : boolean ;
41+ animated : boolean ;
42+ stretched : boolean ;
3943 pageFactory : PageFactory ;
4044 parentView : ViewBase ;
4145 resolver : ComponentFactoryResolver ;
@@ -48,7 +52,7 @@ export class ModalDialogService {
4852 }
4953
5054 public showModal ( type : Type < any > ,
51- { viewContainerRef, moduleRef, context, fullscreen } : ModalDialogOptions
55+ { viewContainerRef, moduleRef, context, fullscreen, animated , stretched } : ModalDialogOptions
5256 ) : Promise < any > {
5357 if ( ! viewContainerRef ) {
5458 throw new Error (
@@ -77,6 +81,8 @@ export class ModalDialogService {
7781 context,
7882 doneCallback : resolve ,
7983 fullscreen,
84+ animated,
85+ stretched,
8086 pageFactory,
8187 parentView,
8288 resolver,
@@ -90,6 +96,8 @@ export class ModalDialogService {
9096 context,
9197 doneCallback,
9298 fullscreen,
99+ animated,
100+ stretched,
93101 pageFactory,
94102 parentView,
95103 resolver,
@@ -132,7 +140,9 @@ export class ModalDialogService {
132140 ( < any > componentView . parent ) . removeChild ( componentView ) ;
133141 }
134142
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 ) ;
136146 } ) ;
137147 }
138148}
0 commit comments