Skip to content

Commit 4e57749

Browse files
author
vakrilov
committed
Fixed: IOS - crash canceling swipe-back navigation
1 parent 185b96f commit 4e57749

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Diff for: nativescript-angular/router/page-router-outlet.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -179,12 +179,12 @@ export class PageRouterOutlet extends RouterOutlet {
179179

180180
this.location.navigateToNewPage();
181181
return new Promise((resolve, reject) => {
182-
page.on('navigatedTo', () => {
183-
// Finish activation when page is fully navigated to.
182+
page.on('navigatingTo', () => {
183+
// Finish activation when page navigation has started
184184
resolve(componentRef)
185185
});
186186

187-
page.on('navigatingFrom', (<any>global).Zone.current.wrap((args: NavigatedData) => {
187+
page.on('navigatedFrom', (<any>global).Zone.current.wrap((args: NavigatedData) => {
188188
if (args.isBackNavigation) {
189189
this.location.beginBackPageNavigation();
190190
this.location.back();

0 commit comments

Comments
 (0)