Get selected tab


#1

Hello All, I want to check which tab is selected on ion-tabs. I’m using these lines of code: @ViewChild(‘myTabs’) tabRef: Tabs; this.tabRef.getSelected(); it returns me null, how to get the currently selected tab? getSelected not working. :confused: Any help?


#2

Can you explain why you care? I’m having a hard time coming up with a reason for needing to know that isn’t indicative of a design that is not really a good fit for using tabs in the first place.