@@ -18,7 +18,7 @@ class FirstComponent { }
18
18
directives : [ ROUTER_DIRECTIVES , NS_ROUTER_DIRECTIVES ] ,
19
19
styleUrls : [ "examples/navigation/router-outlet-test.css" ] ,
20
20
template : `
21
- <StackLayout>
21
+ <StackLayout #secondStack (loaded)="onLoaded(secondStack)" >
22
22
<Label [text]="'Second component - ' + id" class="title"></Label>
23
23
</StackLayout>`
24
24
} )
@@ -27,6 +27,10 @@ class SecondComponent {
27
27
constructor ( routeParams : RouteParams ) {
28
28
this . id = routeParams . get ( "id" ) ;
29
29
}
30
+
31
+ onLoaded ( args ) {
32
+ console . log ( "==========>>>>>>>>>>>>>SecondComponent loaded event with args: " + args ) ;
33
+ }
30
34
}
31
35
32
36
@Component ( {
@@ -35,7 +39,7 @@ class SecondComponent {
35
39
styleUrls : [ "examples/navigation/router-outlet-test.css" ] ,
36
40
template : `
37
41
<StackLayout>
38
- <StackLayout class="nav">
42
+ <StackLayout #stack class="nav" (loaded)="onLoaded(stack) ">
39
43
<Button text="First" [nsRouterLink]="['First']"></Button>
40
44
<Button text="GO(1)" [nsRouterLink]="['Second', { id: 1 }]"></Button>
41
45
<Button text="GO(2)" [nsRouterLink]="['Second', { id: 2 }]"></Button>
@@ -50,4 +54,8 @@ class SecondComponent {
50
54
{ path : '/first' , component : FirstComponent , name : 'First' , useAsDefault : true } ,
51
55
{ path : '/second/:id' , component : SecondComponent , name : 'Second' } ,
52
56
] )
53
- export class RouterOutletTest { }
57
+ export class RouterOutletTest {
58
+ onLoaded ( args ) {
59
+ console . log ( "==========>>>>>>>>>>>>>RouterOutletTest loaded event with args: " + args ) ;
60
+ }
61
+ }
0 commit comments