Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

199
Vistas
Ionic tabs button not changing color when selected

I'm trying to navigate to a path through tabs but selected tab color not changing when I use

tabs.html
<ion-tab-button [tab]="route">

tabs.ts

ngOnInit() {
    this.getId().get().subscribe((id) => {
        this.route = id;
    });
}

but when I remove [tab] to tab it works fine

I need to get route Id/params from server side.

over 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

To select programmatically one of the tabs you have at least two options.

Navigate to the desired tab:

import { IonTabs, NavController } from '@ionic/angular';

// add NavController to your constructor
constructor(private navCtrl: NavController) {}

// navigate by your route
this.navCtrl.navigateForward('/tabs/tab2');

Select tab:

import { Component, ViewChild } from '@angular/core';

// declare child's IonTab inside your component
@ViewChild(IonTabs) tabs: IonTabs;

// select your tab
this.tabs.select('tab2');
over 4 years ago · Santiago Trujillo Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda