Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

198
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda