diff --git a/nativescript-angular/platform-common.ts b/nativescript-angular/platform-common.ts index cd9d02dd4..40dc0cec5 100644 --- a/nativescript-angular/platform-common.ts +++ b/nativescript-angular/platform-common.ts @@ -191,19 +191,8 @@ export class NativeScriptPlatformRef extends PlatformRef { @profile private bootstrapNativeScriptApp() { const autoCreateFrame = !!this.appOptions.createFrameOnBootstrap; - let tempAppHostView: AppHostView; let rootContent: View; - if (autoCreateFrame) { - const { page, frame } = this.createFrameAndPage(false); - setRootPage(page); - rootContent = frame; - } else { - // Create a temp page for root of the renderer - tempAppHostView = new AppHostView(); - setRootPage(tempAppHostView); - } - if (isLogEnabled()) { bootstrapLog("NativeScriptPlatform bootstrap started."); } @@ -214,6 +203,17 @@ export class NativeScriptPlatformRef extends PlatformRef { bootstrapLog("Application launch event fired"); } + let tempAppHostView: AppHostView; + if (autoCreateFrame) { + const { page, frame } = this.createFrameAndPage(false); + setRootPage(page); + rootContent = frame; + } else { + // Create a temp page for root of the renderer + tempAppHostView = new AppHostView(); + setRootPage(tempAppHostView); + } + let bootstrapPromiseCompleted = false; this._bootstrapper().then( moduleRef => {