@@ -139,14 +139,19 @@ export const COMMON_PROVIDERS: StaticProvider[] = [
139139] ;
140140
141141export const platformNativeScript = createPlatformFactory ( platformCore , 'nativescriptDynamic' , COMMON_PROVIDERS ) ;
142- function createProvidersConfig ( options ?: ApplicationConfig ) {
142+ export interface BootstrapContext {
143+ platformRef ?: PlatformRef ;
144+ }
145+
146+ function createProvidersConfig ( options ?: ApplicationConfig , context ?: BootstrapContext ) {
143147 return {
148+ platformRef : context ?. platformRef ,
144149 appProviders : [
145150 ...NATIVESCRIPT_MODULE_STATIC_PROVIDERS ,
146151 ...NATIVESCRIPT_MODULE_PROVIDERS ,
147152 ...( options ?. providers ?? [ ] ) ,
148153 ] ,
149- platformProviders : COMMON_PROVIDERS ,
154+ platformProviders : context ?. platformRef ? [ ] : COMMON_PROVIDERS ,
150155 } ;
151156}
152157
@@ -157,8 +162,8 @@ export function bootstrapApplication(rootComponent: Type<any>, options?: Applica
157162 } ) ;
158163}
159164
160- export function createApplication ( options ?: ApplicationConfig ) {
161- return ɵinternalCreateApplication ( createProvidersConfig ( options ) ) ;
165+ export function createApplication ( options ?: ApplicationConfig , context ?: BootstrapContext ) {
166+ return ɵinternalCreateApplication ( createProvidersConfig ( options , context ) ) ;
162167}
163168
164169export interface HmrOptions {
0 commit comments