We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7c23f9a commit c8370d9Copy full SHA for c8370d9
packages/angular/common/src/providers/nav-controller.ts
@@ -39,9 +39,8 @@ export class NavController {
39
if (ev instanceof NavigationStart) {
40
// restoredState is set if the browser back/forward button is used
41
const id = ev.restoredState ? ev.restoredState.navigationId : ev.id;
42
- this.guessDirection = id < this.lastNavId ? 'back' : 'forward';
43
- this.guessAnimation = this.guessDirection;
44
- this.lastNavId = id;
+ this.guessAnimation = this.guessDirection = id < this.lastNavId ? 'back' : 'forward';
+ this.lastNavId = this.guessDirection === 'forward' ? ev.id : id;
45
}
46
});
47
0 commit comments