@@ -4,20 +4,22 @@ import {AppComponent} from "./app.component";
4
4
import { GestureComponent } from "./snippets/gestures.component" ;
5
5
import { LayoutsComponent } from "./snippets/layouts.component" ;
6
6
import { IconFontComponent } from "./snippets/icon-font.component" ;
7
- import { NS_ROUTER_DIRECTIVES , NS_ROUTER_PROVIDERS } from "nativescript-angular/router-deprecated" ;
7
+ // import {NS_ROUTER_DIRECTIVES, NS_ROUTER_PROVIDERS} from "nativescript-angular/router-deprecated";
8
8
import { APP_ROOT_VIEW } from "nativescript-angular/platform-providers" ;
9
9
import { Page } from "ui/page" ;
10
10
import { Label } from "ui/label" ;
11
11
import { StackLayout } from "ui/layouts/stack-layout" ;
12
12
import * as application from "application" ;
13
13
//nativeScriptBootstrap(AppComponent, [NS_ROUTER_PROVIDERS]);
14
14
import { HOOKS_LOG } from "./base.component" ;
15
- import { MultiPageMain } from "./multi-page-main.component" ;
16
- import { SinglePageMain } from "./single-page-main.component" ;
15
+ import { MultiPageMain , MultiPageRouterProviders } from "./multi-page-main.component" ;
16
+ import { SinglePageMain , SinglePageRouterProviders } from "./single-page-main.component" ;
17
17
import { provide , OpaqueToken } from "@angular/core" ;
18
18
19
19
import { rendererTraceCategory , routerTraceCategory } from "nativescript-angular/trace" ;
20
20
21
+ import { BehaviorSubject } from "rxjs" ;
22
+
21
23
import trace = require( "trace" ) ;
22
24
//trace.setCategories(rendererTraceCategory + "," + routerTraceCategory);
23
25
trace . enable ( ) ;
@@ -40,13 +42,16 @@ application.start({
40
42
//profiling.start('ng-bootstrap');
41
43
console . log ( 'BOOTSTRAPPING TEST APPS...' ) ;
42
44
//bootstrap(MultiPageMain, [NS_ROUTER_PROVIDERS]);
45
+
43
46
const rootViewProvider = provide ( APP_ROOT_VIEW , { useValue : root } ) ;
44
- let singlePageHooksLog = [ ]
47
+
48
+ let singlePageHooksLog = new BehaviorSubject ( [ ] ) ;
45
49
const singlePageHooksLogProvider = provide ( HOOKS_LOG , { useValue : singlePageHooksLog } ) ;
46
- bootstrap ( SinglePageMain , [ rootViewProvider , singlePageHooksLogProvider , NS_ROUTER_PROVIDERS ] ) ;
47
- let multiPageHooksLog = [ ]
50
+ bootstrap ( SinglePageMain , [ rootViewProvider , singlePageHooksLogProvider , SinglePageRouterProviders ] ) ;
51
+
52
+ let multiPageHooksLog = new BehaviorSubject ( [ ] ) ;
48
53
const multiPageHooksLogProvider = provide ( HOOKS_LOG , { useValue : multiPageHooksLog } ) ;
49
- bootstrap ( MultiPageMain , [ rootViewProvider , multiPageHooksLogProvider , NS_ROUTER_PROVIDERS ] ) ;
54
+ bootstrap ( MultiPageMain , [ rootViewProvider , multiPageHooksLogProvider , MultiPageRouterProviders ] ) ;
50
55
}
51
56
52
57
page . on ( 'loaded' , onLoadedHandler ) ;
0 commit comments