ionic-team / ionic-team/ionic-framework

IonRouterOutlet.pop() doesn't properly update the browser navigation history

Aperta
#15,428 4 commenti 11 reazioni 0 assegnatari Vedi su GitHub
package: angular
Lingua principale
TypeScript
Stelle
52.7k
Fork
13.3k
Merge medio
1g 15h
PR unite (30g)
51

Descrizione

# Bug Report

**Ionic Info**
```
Ionic:

ionic (Ionic CLI) : 4.1.1 (C:\Users\User\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.0-beta.5
@angular-devkit/core : 0.7.5
@angular-devkit/schematics : 0.7.5
@angular/cli : 6.1.5
@ionic/ng-toolkit : 1.0.7
@ionic/schematics-angular : 1.0.5

Cordova:

cordova (Cordova CLI) : 7.1.0
Cordova Platforms : android 6.3.0
Cordova Plugins : not available

System:

Android SDK Tools : 26.1.1 (C:\Android\sdk\)
NodeJS : v8.9.1 (C:\Program Files\nodejs\node.exe)
npm : 5.5.1
```

**Describe the Bug**
When we use `IonRouterOutlet.pop()` to go back to previous url, it seems that it does take us to previous page but doesn't update the browser navigation history.

**Steps to Reproduce**
For example, if we follow this path Page A > Page B > Page C and then use `IonRouterOutlet.pop()` in Page C to go back to Page B, it will take us to previous page i.e. Page B but now if we press Browser back button once nothing will happen, if we press it another time it will take us to Page A. If the browser history was updated properly, pressing Browser back button once should take us to Page A.

As a result,

- Navigation has unexpected behaviour
- Breaks Angular relative routes

**Expected Behavior**
Navigation should work properly.

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.