Reputation: 801
When you start an ionic application with a tabbar on the bottom, it always starts the App with the first Tab active.
But I have 3 tabs, and I want the Tab in the middle to be the active Tab that starts when I open the App.
Can't find in the docs how to do this. Someone?
Upvotes: 0
Views: 36
Reputation: 3011
There is $ionicTabsDelegate for your needs. You can inject it into any controller, or your app's run block. Then you do it similar to the example:
function MyCtrl($scope, $ionicTabsDelegate) {
//use 1 to select the second tab (starts with 0)
$ionicTabsDelegate.select(1);
}
if you want to have it when your app starts, put in in your run block
Upvotes: 1