@@ -21,25 +21,24 @@ trace.setCategories(routerTraceCategory);
21
21
// trace.setCategories(listViewTraceCategory);
22
22
trace . enable ( ) ;
23
23
24
- import { RendererTest } from './examples/renderer-test' ;
25
- import { TabViewTest } from './examples/tab-view/tab-view-test' ;
26
- import { Benchmark } from './performance/benchmark' ;
27
- import { ListTest } from './examples/list/list-test' ;
28
- import { ListTestAsync , ListTestFilterAsync } from "./examples/list/list-test-async" ;
29
- import { ImageTest } from "./examples/image/image-test" ;
30
- import { HttpTest } from "./examples/http/http-test" ;
31
- import { ActionBarTest } from "./examples/action-bar/action-bar-test" ;
32
- import { ModalTest } from "./examples/modal/modal-test" ;
33
- import { PlatfromDirectivesTest } from "./examples/platform-directives/platform-directives-test" ;
34
- import { LivesyncApp , LivesyncTestRouterProviders } from "./examples/livesync-test/livesync-test-app" ;
35
-
24
+ import { RendererTest } from './examples/renderer-test' ;
25
+ import { TabViewTest } from './examples/tab-view/tab-view-test' ;
26
+ import { Benchmark } from './performance/benchmark' ;
27
+ import { ListTest } from './examples/list/list-test' ;
28
+ import { ListTestAsync , ListTestFilterAsync } from "./examples/list/list-test-async" ;
29
+ import { ImageTest } from "./examples/image/image-test" ;
30
+ import { HttpTest } from "./examples/http/http-test" ;
31
+ import { ActionBarTest } from "./examples/action-bar/action-bar-test" ;
32
+ import { ModalTest } from "./examples/modal/modal-test" ;
33
+ import { PlatfromDirectivesTest } from "./examples/platform-directives/platform-directives-test" ;
34
+ import { LivesyncApp , LivesyncTestRouterProviders } from "./examples/livesync-test/livesync-test-app" ;
36
35
37
36
// new router
38
37
import { RouterOutletAppComponent } from "./examples/router/router-outlet-test" ;
39
38
import { PageRouterOutletAppComponent } from "./examples/router/page-router-outlet-test" ;
40
- import { PageRouterOutletNestedAppComponent , PageRouterOutletNestedRouterProviders } from "./examples/router/page-router-outlet-nested-test" ;
41
- import { ClearHistoryAppComponent , ClearHistoryRouterProviders } from "./examples/router/clear-history-test" ;
42
- import { LoginAppComponent , LoginExampleProviders } from "./examples/router/login-test" ;
39
+ import { PageRouterOutletNestedAppComponent } from "./examples/router/page-router-outlet-nested-test" ;
40
+ import { ClearHistoryAppComponent } from "./examples/router/clear-history-test" ;
41
+ import { LoginAppComponent } from "./examples/router/login-test" ;
43
42
44
43
// animations
45
44
import { AnimationEnterLeaveTest } from "./examples/animation/animation-enter-leave-test" ;
@@ -50,15 +49,6 @@ import { AnimationStatesTest } from "./examples/animation/animation-states-test"
50
49
// nativeScriptBootstrap(HttpTest);
51
50
//nativeScriptBootstrap(ActionBarTest, [NS_ROUTER_PROVIDERS_DEPRECATED], { startPageActionBarHidden: false });
52
51
//nativeScriptBootstrap(ActionBarTest, [NS_ROUTER_PROVIDERS_DEPRECATED]);
53
- //nativeScriptBootstrap(ModalTest);
54
- //nativeScriptBootstrap(PlatfromDirectivesTest);
55
-
56
- // new router
57
- //nativeScriptBootstrap(RouterOutletAppComponent, [RouterOutletRouterProviders]);
58
- // nativeScriptBootstrap(PageRouterOutletAppComponent, [PageRouterOutletRouterProviders]);
59
- // nativeScriptBootstrap(PageRouterOutletNestedAppComponent, [PageRouterOutletNestedRouterProviders]);
60
- // nativeScriptBootstrap(ClearHistoryAppComponent, [ClearHistoryRouterProviders]);
61
- // nativeScriptBootstrap(LoginAppComponent, [LoginExampleProviders]);
62
52
63
53
@NgModule ( {
64
54
declarations : [
@@ -77,20 +67,25 @@ import { AnimationStatesTest } from "./examples/animation/animation-states-test"
77
67
} )
78
68
class ExampleModule { }
79
69
80
- function makeExampleModule ( componentType , routes = null , entryComponents = null ) {
70
+ function makeExampleModule ( componentType ) {
81
71
let imports : any [ ] = [ ExampleModule ] ;
82
- if ( routes ) {
83
- imports . push ( NativeScriptRouterModule . forRoot ( routes ) )
72
+ if ( componentType . routes ) {
73
+ imports . push ( NativeScriptRouterModule . forRoot ( componentType . routes ) )
84
74
}
85
75
let entries = [ ] ;
86
- if ( entryComponents ) {
87
- entries = entryComponents ;
76
+ if ( componentType . entries ) {
77
+ entries = componentType . entries ;
78
+ }
79
+ let providers = [ ] ;
80
+ if ( componentType . providers ) {
81
+ providers = componentType . providers
88
82
}
89
83
@NgModule ( {
90
84
bootstrap : [ componentType ] ,
91
85
imports : imports ,
92
86
entryComponents : entries ,
93
87
declarations : entries ,
88
+ providers : providers ,
94
89
} )
95
90
class ExampleModuleForComponent { }
96
91
@@ -103,8 +98,15 @@ function makeExampleModule(componentType, routes = null, entryComponents = null)
103
98
//platformNativeScriptDynamic().bootstrapModule(makeExampleModule(ListTest));
104
99
//platformNativeScriptDynamic().bootstrapModule(makeExampleModule(ListTestAsync));
105
100
//platformNativeScriptDynamic().bootstrapModule(makeExampleModule(ImageTest));
106
- //platformNativeScriptDynamic().bootstrapModule(makeExampleModule(RouterOutletAppComponent, RouterOutletAppComponent.routes));
107
- platformNativeScriptDynamic ( ) . bootstrapModule ( makeExampleModule ( PageRouterOutletAppComponent , PageRouterOutletAppComponent . routes , PageRouterOutletAppComponent . entries ) ) ;
101
+ //platformNativeScriptDynamic().bootstrapModule(makeExampleModule(ModalTest));
102
+ //platformNativeScriptDynamic().bootstrapModule(makeExampleModule(PlatfromDirectivesTest));
103
+
104
+ //new router
105
+ //platformNativeScriptDynamic().bootstrapModule(makeExampleModule(RouterOutletAppComponent));
106
+ //platformNativeScriptDynamic().bootstrapModule(makeExampleModule(PageRouterOutletAppComponent));
107
+ //platformNativeScriptDynamic().bootstrapModule(makeExampleModule(PageRouterOutletNestedAppComponent));
108
+ //platformNativeScriptDynamic().bootstrapModule(makeExampleModule(ClearHistoryAppComponent));
109
+ platformNativeScriptDynamic ( ) . bootstrapModule ( makeExampleModule ( LoginAppComponent ) ) ;
108
110
109
111
// Livesync test
110
112
// var cahcedUrl: string;
0 commit comments