Switching tabs inside controller

hello there,
i want to switch tabs from inside the tabs page controller.
I did it, like it was described in the docs:

Alternatively, you can grab the Tabs instance and call the select() method. This requires the <ion-tabs> element to have an id. For example, set the value of id to myTabs:

<ion-tabs #myTabs>
  <ion-tab [root]="tab1Root"></ion-tab>
  <ion-tab [root]="tab2Root"></ion-tab>
  <ion-tab [root]="tab3Root"></ion-tab>
Then in your class you can grab the Tabs instance and call select(), passing the index of the tab as the argument. Here we're grabbing the tabs by using ViewChild.

export class TabsPage {

@ViewChild('myTabs') tabRef: Tabs;

ionViewDidEnter() {


So i did it, but my tabRef is undefined.
Maybe i am wrong getting the “Tabs instance”. To do this:

@ViewChild('myTabs') tabRef: Tabs;

i included “Tabs” from “ionic-angular”. Is this correct?

Best regards