@@ -11,7 +11,7 @@ import { NgModule } from "@angular/core";
1111import { Router } from "@angular/router" ;
1212import { NativeScriptRouterModule } from "nativescript-angular/router" ;
1313import { NativeScriptFormsModule } from "nativescript-angular/forms" ;
14- import { HTTP_PROVIDERS } from "@ angular/http" ;
14+ import { NativeScriptHttpModule } from "nativescript- angular/http" ;
1515import { rendererTraceCategory , routerTraceCategory , listViewTraceCategory } from "nativescript-angular/trace" ;
1616
1717import trace = require( "trace" ) ;
@@ -54,11 +54,13 @@ import { AnimationStatesTest } from "./examples/animation/animation-states-test"
5454 imports : [
5555 NativeScriptModule ,
5656 NativeScriptFormsModule ,
57+ NativeScriptHttpModule ,
5758 NativeScriptRouterModule ,
5859 ] ,
5960 exports : [
6061 NativeScriptModule ,
6162 NativeScriptFormsModule ,
63+ NativeScriptHttpModule ,
6264 NativeScriptRouterModule ,
6365 ] ,
6466 providers : [ ]
@@ -70,6 +72,10 @@ function makeExampleModule(componentType) {
7072 if ( componentType . routes ) {
7173 imports . push ( NativeScriptRouterModule . forRoot ( componentType . routes ) )
7274 }
75+ let exports : any [ ] = [ ] ;
76+ if ( componentType . exports ) {
77+ exports = componentType . exports
78+ }
7379 let entries = [ ] ;
7480 if ( componentType . entries ) {
7581 entries = componentType . entries ;
@@ -83,8 +89,12 @@ function makeExampleModule(componentType) {
8389 bootstrap : [ componentType ] ,
8490 imports : imports ,
8591 entryComponents : entries ,
86- declarations : entries ,
92+ declarations : [
93+ ...entries ,
94+ ...exports ,
95+ ] ,
8796 providers : providers ,
97+ exports : exports ,
8898 } )
8999 class ExampleModuleForComponent { }
90100
@@ -112,7 +122,7 @@ function makeExampleModule(componentType) {
112122//platformNativeScriptDynamic().bootstrapModule(makeExampleModule(AnimationStatesTest));
113123//platformNativeScriptDynamic().bootstrapModule(makeExampleModule(AnimationNgClassTest));
114124//platformNativeScriptDynamic().bootstrapModule(makeExampleModule(AnimationKeyframesTest));
115- // platformNativeScriptDynamic().bootstrapModule(makeExampleModule(AnimationEnterLeaveTest));
125+ platformNativeScriptDynamic ( ) . bootstrapModule ( makeExampleModule ( AnimationEnterLeaveTest ) ) ;
116126
117127//Livesync test
118128var cachedUrl : string ;
@@ -134,5 +144,5 @@ onAfterLivesync.subscribe((moduleRef) => {
134144 }
135145} ) ;
136146
137- platformNativeScriptDynamic ( ) . bootstrapModule ( makeExampleModule ( LivesyncApp ) ) ;
147+ // platformNativeScriptDynamic().bootstrapModule(makeExampleModule(LivesyncApp));
138148console . log ( "APP RESTART" ) ;
0 commit comments