ionic-team / ionic-team/ionic-framework

bug: Ionic Angular routerDirection not being reset to "auto"

Abierto
#21,161 2 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] **5.0.7**

**Current behavior:**
Navigation to same route twice using `[routerLink]` with `routerDirection="root"` does not reload component (expected), but leaves changed `direction=root`.

**Expected behavior:**
When navigation was dismissed (not consumed by NavController) `direction` should be set back to `auto` (or not modified at all) as if it would be after the transition finished.

**Steps to reproduce:**
1. https://github.com/kamilchlebek/ionic-router-issue
2. `ionic serve`
3. Tap `go to sub page`
4. You'll see expected back button
5. Tap back button
6. Open side menu - tap "Page" (which links to already opened page)
7. Tap `go to sub page`
8. :x: there's no back button

**Other information:**

Same thing happens while using angular v9
Of course I know that I can update `direction` manually before using `router.navigate` but it took me a while to figure it out.

**Ionic info:**
```
Ionic:

Ionic CLI : 6.6.0
Ionic Framework : @ionic/angular 5.0.7
@angular-devkit/build-angular : 0.803.26
@angular-devkit/schematics : 8.3.26
@angular/cli : 8.3.26
@ionic/angular-toolkit : 2.2.0

Utility:

cordova-res : not installed
native-run : 1.0.0

System:

NodeJS : v12.16.1
npm : 6.13.4
OS : Linux 4.15
```

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.