File tree 3 files changed +4
-6
lines changed
nativescript-angular/router
3 files changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ export class Outlet {
25
25
path : string ;
26
26
pathByOutlets : string ;
27
27
states : Array < LocationState > = [ ] ;
28
+ isNSEmptyOutlet : boolean ;
28
29
29
30
// Used in reuse-strategy by its children to determine if they should be detached too.
30
31
shouldDetach : boolean = true ;
@@ -41,10 +42,6 @@ export class Outlet {
41
42
return this . frames . indexOf ( frame ) > - 1 ;
42
43
}
43
44
44
- isNSEmptyOutlet ( ) : boolean {
45
- return this . frames . length > 1 ;
46
- }
47
-
48
45
peekState ( ) : LocationState {
49
46
if ( this . states . length > 0 ) {
50
47
return this . states [ this . states . length - 1 ] ;
Original file line number Diff line number Diff line change @@ -280,6 +280,7 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire
280
280
return ;
281
281
}
282
282
283
+ this . outlet . isNSEmptyOutlet = this . isEmptyOutlet ;
283
284
this . locationStrategy . updateOutletFrame ( this . outlet , this . frame ) ;
284
285
285
286
if ( this . outlet && this . outlet . isPageNavigationBack ) {
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ export class RouterExtensions {
96
96
let relativeRoute = options . relativeTo || rootRoute ;
97
97
98
98
const relativeRouteOutlet = this . findOutletByRoute ( relativeRoute ) ;
99
- const isNSEmptyOutlet = relativeRouteOutlet && relativeRouteOutlet . isNSEmptyOutlet ( ) ;
99
+ const isNSEmptyOutlet = relativeRouteOutlet && relativeRouteOutlet . isNSEmptyOutlet ;
100
100
101
101
// Lazy named outlet has added 'primary' inner NSEmptyOutlet child.
102
102
// Take parent route when `relativeTo` option points to the outer named outlet.
@@ -110,7 +110,7 @@ export class RouterExtensions {
110
110
for ( let index = 0 ; index < routesToMatch . length ; index ++ ) {
111
111
const currentRoute = routesToMatch [ index ] ;
112
112
if ( outlets . some ( currentOutlet => currentOutlet === currentRoute . outlet ) ) {
113
- let outlet = this . findOutletByRoute ( currentRoute ) ;
113
+ const outlet = this . findOutletByRoute ( currentRoute ) ;
114
114
115
115
if ( outlet ) {
116
116
outletsToBack . push ( outlet ) ;
You can’t perform that action at this time.
0 commit comments