Delegate for controlling the ionTabs directive.

Methods called directly on the $ionicTabsDelegate service will control all ionTabs directives. Use the $getByHandle method to control specific ionTabs instances.


<body ng-controller="MyCtrl">

    <ion-tab title="Tab 1">
      Hello tab 1!
      <button ng-click="selectTabWithIndex(1)">Select tab 2!</button>
    <ion-tab title="Tab 2">Hello tab 2!</ion-tab>

function MyCtrl($scope, $ionicTabsDelegate) {
  $scope.selectTabWithIndex = function(index) {



Select the tab matching the given index.

Param Type Details
index number

Index of the tab to select.


  • Returns: number The index of the selected tab, or -1.


Set/get whether the ionTabs is shown

Param Type Details
show boolean

Whether to show the bar.

  • Returns: boolean Whether the bar is shown.


Param Type Details
handle string
  • Returns: delegateInstance A delegate instance that controls only the ionTabs directives with delegate-handle matching the given handle.

Example: $ionicTabsDelegate.$getByHandle('my-handle').select(0);