[Ionic 4] - Get current Tab selected


On Ionic 4 I am not able to understand on how to get the current selected tab… below is the html code …

<ion-tabs #myTabs (ionChange)="tabSwitched(myTabs)"></ion-tabs>
tabSwitched(myTabs) {
    // this.events.publish('refresh:channels', Date.now());
//Output comes up like this and I am not sure how to get through the selected Id.

Is this the right approach :slight_smile: or am I doing something wrong here…requesting anyone to please help!

Thanks in advance!

Remove hashbangs from URL


  <ion-tab tabIcon="contact" [root]="tabCustomers" (ionSelect)="doSomething()"></ion-tab>


Thank you so much !!! :slight_smile: