How to access ion-tabs component in ionic3?


#1

As guided in @ionic documentation I am using @ViewChild(‘mytab’) mytab:Tabs to access my tabs as shown below:
<ion-tabs class=“tabs-icon-text” #mytab selectedIndex=“0”>
<ion-tab [root]=“tab1Root” tabIcon=“icon-article” tabTitle=“Article”>
<ion-tab [root]=“tab2Root” tabIcon=“icon-print” tabTitle=“NewsLetter”>
<ion-tab [root]=“tab3Root” tabIcon=“icon-user” tabTitle=“User”>

but while I am trying to get selected tab using this.mytab.getSelected() I am getting error:
Uncaught (in promise): TypeError: Cannot read property ‘getSelected’ of undefined TypeError: Cannot read property ‘getSelected’ of undefined at new TabsPage.
Is there any other way to access tabs ionic3 and angular4?