Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

197
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!