ionic-team / ionic-team/ionic-framework

bug: ion-tab-button not selected when using routeParams

Abierto
#18,726 10 comentarios 1 reacción 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.6.0
(ionic/angular)

**Current behavior:**
When using a param in [tab] of an ion-tab-button, the ion-tab-button is not recognized as selected when navigating to the tab.
Example:
``
When clicking this button, 'patient/0' route is called and the tab patient/0 is shown. But the ion-tab-button is not recognized as selected.

**Expected behavior:**
I would expect that the ion-tab-button is recognized as selected.

**Other information:**
I was able to find that an stackId is used internally to decide if an ion-tab-button is selected. stackId is looking to the url and only taking the part 'patient' and ignores '/0'.

**Ionic info:**
```
Ionic:
Ionic CLI : 5.0.3 (/usr/local/lib/node_modules/ionic)
Ionic Framework : @ionic/angular 4.6.0
@angular-devkit/build-angular : 0.13.9
@angular-devkit/schematics : 7.3.9
@angular/cli : 7.3.9
@ionic/angular-toolkit : 1.5.1

Cordova:
Cordova CLI : 9.0.0 (cordova-lib@9.0.1)
Cordova Platforms : ios 4.5.5
Cordova Plugins : cordova-plugin-ionic 5.2.1, cordova-plugin-ionic-keyboard 2.1.3, cordova-plugin-ionic-webview 3.1.2, (and 9 other plugins)

Utility:
cordova-res : not installed
native-run : not installed

System:
ios-deploy : 1.9.4
ios-sim : 8.0.1
NodeJS : v10.15.3 (/usr/local/bin/node)
npm : 6.9.0
OS : macOS Mojave
Xcode : Xcode 10.2.1 Build version 10E1001
```

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.