How to set which ion-tab is default

> <script id="tabs2.html" type="text/ng-template">
>       <ion-tabs tabs-style="tabs-icon-top" tabs-type="tabs-positive">
>             <ion-tab title="Home" icon="ion-home" href="#/main/tabs">
>             <ion-tab title="home2" icon-on="ion-ios7-filing" icon-off="ion-ios7-filing-outline" href="#/main/tabs2">
>                 <ion-content has-header="true" padding="true">
>                     <h2>Tab 2 Content</h2>
>                 </ion-content>
>             </ion-tab>
>         </ion-tab>
> </script>

i want set home2 is default ,and it is after home

1 Like

see this sample :

I’m using $scope.tabsController.select(1). However it must be wrapped in a timeout. Otherwise, the tabs don’t exist yet when it is run and causes a faiure.

It´s simple, just change this line:

$urlRouterProvider.otherwise(’/main/tabs2’);

at the end of app.js

1 Like