Skip to content
Merged
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,14 @@
<a name="8.20.4"></a>
## [8.20.4](https://github.com/NativeScript/nativescript-angular/compare/8.20.3...8.20.4) (2020-01-07)


### Bug Fixes

* add context to frame navigation ([#2100](https://github.com/NativeScript/nativescript-angular/pull/2100))
* wrong import path in compat package ([#2097](https://github.com/NativeScript/nativescript-angular/pull/2097))



<a name="8.20.3"></a>
## [8.20.3](https://github.com/NativeScript/nativescript-angular/compare/8.20.2...8.20.3) (2019-11-13)

Expand Down
2 changes: 1 addition & 1 deletion nativescript-angular-package/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nativescript-angular",
"version": "8.30.0",
"version": "8.21.0",
"description": "An Angular renderer that lets you build mobile apps with NativeScript.",
"homepage": "https://www.nativescript.org/",
"bugs": "https://github.com/NativeScript/nativescript-angular/issues",
Expand Down
2 changes: 1 addition & 1 deletion nativescript-angular-package/zone-js/testing.jasmine.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
// Bootstrap helper module for jasmine spec tests
import "@nativescript/angular/platform";
import "@nativescript/angular/dist/zone-nativescript.jasmine.js";
import "@nativescript/angular/zone-js/dist/zone-nativescript.jasmine.js";
2 changes: 1 addition & 1 deletion nativescript-angular/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@nativescript/angular",
"version": "8.30.0",
"version": "8.21.0",
"description": "An Angular renderer that lets you build mobile apps with NativeScript.",
"homepage": "https://www.nativescript.org/",
"bugs": "https://github.com/NativeScript/nativescript-angular/issues",
Expand Down
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
5 changes: 3 additions & 2 deletions nativescript-angular/router/page-router-outlet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -361,13 +361,13 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire
this.changeDetector.markForCheck();

this.activated = loaderRef.instance.loadWithFactory(factory);
this.loadComponentInPage(page, this.activated);
this.loadComponentInPage(page, this.activated, { activatedRoute });

this.activated[loaderRefSymbol] = loaderRef;
}

@profile
private loadComponentInPage(page: Page, componentRef: ComponentRef<any>): void {
private loadComponentInPage(page: Page, componentRef: ComponentRef<any>, navigationContext): void {
// Component loaded. Find its root native view.
const componentView = componentRef.location.nativeElement;
// Remove it from original native parent.
Expand Down Expand Up @@ -406,6 +406,7 @@ export class PageRouterOutlet implements OnDestroy { // tslint:disable-line:dire
create() {
return page;
},
context: navigationContext,
clearHistory: navOptions.clearHistory,
animated: navOptions.animated,
transition: navOptions.transition
Expand Down