mirror of
https://github.com/ionic-team/ionic-framework.git
synced 2025-08-19 11:41:20 +08:00
test(angular): add navigation tests (#16494)
This commit is contained in:
@ -23,7 +23,7 @@ export class NavController {
|
||||
if (ev instanceof NavigationStart) {
|
||||
const id = (ev.restoredState) ? ev.restoredState.navigationId : ev.id;
|
||||
this.guessDirection = id < this.lastNavId ? 'back' : 'forward';
|
||||
this.lastNavId = id;
|
||||
this.lastNavId = this.guessDirection === 'forward' ? ev.id : id;
|
||||
}
|
||||
});
|
||||
|
||||
@ -77,6 +77,7 @@ export class NavController {
|
||||
|
||||
if (this.direction === 'auto') {
|
||||
direction = this.guessDirection;
|
||||
console.log('guessed', direction);
|
||||
animated = direction !== 'root';
|
||||
} else {
|
||||
animated = this.animated;
|
||||
|
Reference in New Issue
Block a user