Cannot add a new tab in ionic-starter-tabs project


#1

I am new to ionic and just created a new tabs starter project using the ionic start myApp tabs command. And I would like to replace the default Dashboard tab with a new Home tab that I created. I copied tab-dash.html to the new tab-home.html that I created. And in tabs.html I added the following code:

<ion-tab title="Home"icon-off="ion-ios-home-outline" icon-on="ion-ios-home" href="#/tab/home">
<ion-nav-view name="tab-home"></ion-nav-view>

Then I build it and emulate it on iOS, but when the app opens the Home tab is blank. Please let me know what did I do wrong or if I have missed something, thanks!


#2

How did you define your tabs.home state?


#3

Thanks, I overlooked the app.js. Now I added the state for routing, its working perfectly. And I wonder how to change the default active tab from the first one to another one?


#4
$urlRouterProvider.otherwise('/tab/home');