File tree 1 file changed +8
-1
lines changed
nativescript-angular/directives
1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -67,6 +67,10 @@ export class ModalDialogService {
67
67
parentView = parentView . ngAppRoot ;
68
68
}
69
69
70
+ if ( parentView . _ngDialogRoot ) {
71
+ parentView = parentView . _ngDialogRoot ;
72
+ }
73
+
70
74
const pageFactory : PageFactory = viewContainerRef . injector . get ( PAGE_FACTORY ) ;
71
75
72
76
// resolve from particular module (moduleRef)
@@ -76,7 +80,9 @@ export class ModalDialogService {
76
80
77
81
const frame = parentView . page && parentView . page . frame ;
78
82
79
- this . location . _beginModalNavigation ( frame ) ;
83
+ if ( frame ) {
84
+ this . location . _beginModalNavigation ( frame ) ;
85
+ }
80
86
81
87
return new Promise ( ( resolve , reject ) => {
82
88
setTimeout ( ( ) => {
@@ -144,6 +150,7 @@ export class ModalDialogService {
144
150
componentView = detachedProxy . getChildAt ( 0 ) ;
145
151
146
152
if ( componentView . parent ) {
153
+ ( < any > componentView . parent ) . _ngDialogRoot = componentView ;
147
154
( < any > componentView . parent ) . removeChild ( componentView ) ;
148
155
}
149
156
You can’t perform that action at this time.
0 commit comments