ionic-team / ionic-team/ionic-framework

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

Abierto
#15,428 4 comentarios 11 reacciones 0 asignados Ver en GitHub
package: angular
Lenguaje dominante
TypeScript
Estrellas
52.7k
Forks
13.3k
Merge medio
1 d 15 h
PR fusionados (30 d)
51

Descripción

# 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.

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.