Hi everybody. I just downloaded a blank template in ionic-1. And I added a ion-tabs,
what I want to do is when the app opens, by default it will open the home.html
and the home-icon in the tab is selected, and when i switch to the second item of the tab which is the chats it should change the view: from home.html
to chats.html
. I am having trouble in $urlRouterProvider
. Please help me.
NOTE: I know that there’s a tab template that can be downloaded, what I want is to explore how it is working. That’s why I downloaded the blank template and manually add the ion-tabs
. And now im having trouble in switching views.
Here’s my code;
<ion-pane>
<ion-header-bar class="bar-assertive" align-title="center">
<h1 class="title">
<img src="img/brand.png" width="50px" style="vertical-align: middle;margin-top: -5px">
<span class="ubuntu-r">cloudrooms</span>
</h1>
</ion-header-bar>
<ion-content>
</ion-content>
<ion-tabs class="tabs-icon-top tabs-color-active-assertive">
<ion-tab title="Status" icon-off="ion-ios-home-outline" icon-on="ion-ios-home" href="#/tab/dash">
<ion-nav-view name="tab-dash"></ion-nav-view>
</ion-tab>
<ion-tab title="Chats" icon-off="ion-ios-chatboxes-outline" icon-on="ion-ios-chatboxes" href="#/tab/chats">
<ion-nav-view name="tab-chats"></ion-nav-view>
</ion-tab>
</ion-tabs>
</ion-pane>