File tree 1 file changed +9
-1
lines changed
nativescript-angular/router
1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
- import { Component } from "@angular/core" ;
1
+ import { Component , ViewChild } from "@angular/core" ;
2
2
import { Page } from "tns-core-modules/ui/page" ;
3
+ import { PageRouterOutlet } from "./page-router-outlet" ;
3
4
@Component ( {
4
5
// tslint:disable-next-line:component-selector
5
6
selector : "ns-empty-outlet" ,
6
7
moduleId : module . id ,
7
8
template : "<page-router-outlet isEmptyOutlet='true'></page-router-outlet>"
8
9
} )
9
10
export class NSEmptyOutletComponent {
11
+ @ViewChild ( PageRouterOutlet ) pageRouterOutlet : PageRouterOutlet ;
10
12
constructor ( private page : Page ) {
11
13
if ( this . page ) {
12
14
this . page . actionBarHidden = true ;
15
+
16
+ this . page . on ( "loaded" , ( ) => {
17
+ if ( this . pageRouterOutlet && this . page . frame ) {
18
+ this . pageRouterOutlet . setActionBarVisibility ( this . page . frame . actionBarVisibility ) ;
19
+ }
20
+ } ) ;
13
21
}
14
22
}
15
23
}
You can’t perform that action at this time.
0 commit comments