ionic-team / ionic-team/ionic-framework
router outlet pop promise executed after then
- Ngôn ngữ chính
- TypeScript
- Star
- 52.7k
- Fork
- 13.3k
- Merge trung bình
- 1 ngày 15 giờ
- Pull request đã merge (30 ngày)
- 51
Mô tả
# Bug Report
**Ionic version:**
[x] **4.x**
**Current behavior:**
When I call pop() promise on a ion router outlet, and I attach a callback to it, the callback is executed before end of pop.
**Expected behavior:**
The callback should be executed after pop
**Steps to reproduce:**
Ionic 4 project,
**Related code:**
app.component.ts
```
@ViewChild('masterNav', { read: IonRouterOutlet })masterNav: IonRouterOutlet;
@ViewChild('detailNav', { read: IonRouterOutlet })detailNav: IonRouterOutlet;
...
myFunction(): void{
this.masterNav.pop().then(() => {
//this hasn't finish to pop, so it goes to the below route... and then pops it
this.navCtrl.navigateRoot(["", { outlets: { detailNav: "path/to/thing"}}]);
});
}
```
app.component.html
```
```
**Ionic info:**
```
Ionic:
ionic (Ionic CLI) : 4.10.3 (C:\Users\myuser\AppData\Roaming\npm\node_modules\ionic)
Ionic Framework : @ionic/angular 4.0.1
@angular-devkit/build-angular : 0.12.3
@angular-devkit/schematics : 7.2.3
@angular/cli : 7.2.3
@ionic/angular-toolkit : 1.2.3
Cordova:
cordova (Cordova CLI) : not installed
Cordova Platforms : not available
Cordova Plugins : not available
System:
Android SDK Tools : 26.1.1 (C:\Users\myuser\AppData\Local\Android\sdk)
NodeJS : v10.15.0 (C:\Program Files\nodejs\node.exe)
npm : 6.7.0
OS : Windows 10
```
Hướng dẫn đóng góp
Đánh giá
Issue này chưa được đánh giá.