How to redirect to other tab in the same state?


#1

Ok. I have a two tabs… I show one tab by default. When a button is clicked I want to show the other tab and its content. But how do I redirect?

On click of a button how do I navigate from tab1 to tab2?

<ion-view>
<ion-header-bar class="musiclist">
        <h1 class="title" >Playlist</h1>
</ion-header-bar>
    <ion-pane>
        <ion-tabs class="tabs-top">
            <!-- Tab 1 -->
            <ion-tab title="My Albums">
                <ion-nav-view >
                    <ion-content>
                       <!-- some content -->
                    </ion-content>
                </ion-nav-view>
            </ion-tab>
            <!-- Tab 2 -->
            <ion-tab title="Album Store">
                <ion-nav-view >
                    <ion-content>
                       <!-- some content -->
                    </ion-content>
                </ion-nav-view>
            </ion-tab>
        </ion-tabs>
    </ion-pane>
</ion-content>
</ion-view>