ionic-team / ionic-team/ionic-framework

router outlet pop promise executed after then

Abierto
#17,697 9 comentarios 0 reacciones 0 asignados Ver en GitHub
package: angular type: bug
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 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
```

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.