ionic-team / ionic-team/ionic-framework
IonRouterOutlet.pop() doesn't properly update the browser navigation history
- 主要语言
- TypeScript
- 星标
- 52.7k
- 派生
- 13.3k
- 平均合并
- 1 天 15 小时
- 30 天内合并 PR
- 51
描述
# 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.
贡献指南
调研方向
Start by reproducing the Page A > Page B > Page C flow and calling IonRouterOutlet.pop() from Page C. Then inspect the IonRouterOutlet.pop() implementation and browser history behavior; done means the browser back button reaches Page A on the first press and Angular relative routes continue to work.
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- angular, typescript
- 领域
- frontend, mobile-dev
- Issue 类型
- 缺陷
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 活跃度
- 停滞
- 描述清晰度
- 基本清楚
- 新手友好度
- 42/100