Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions nativescript-angular/platform-common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(<any>tempAppHostView);
}

if (isLogEnabled()) {
bootstrapLog("NativeScriptPlatform bootstrap started.");
}
Expand All @@ -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(<any>tempAppHostView);
}

let bootstrapPromiseCompleted = false;
this._bootstrapper().then(
moduleRef => {
Expand Down