On Ionic 4 I am not able to understand on how to get the current selected tab… below is the html code …
//HTML
<ion-tabs #myTabs (ionChange)="tabSwitched(myTabs)"></ion-tabs>
//TS
tabSwitched(myTabs) {
console.log(myTabs.getSelected());
// 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 or am I doing something wrong here…requesting anyone to please help!
Thanks in advance!