Hi,
I’m trying to use an Ionic tab bar with an Ionic side menu, and I feel like everything’s working except one thing. As I understand it, when you change state in the UI router, you can name the view/views that change. I’d like to use an ion-tabs tab bar but ignore its nav views, and have the ion tab buttons trigger a change in state, and then I’ll include ‘views’ property inside those state changes to affect a single nav-view.
Is this possible? It’s not working for me so far. Here are snippets of my code that are probably relevant:
My first attempt was a nav view just inside , not inside a side menu:
<ion-nav-view name="myView"></ion-nav-view>
My second attempt was the nav view inside ion-side-menu-content
<ion-nav-view class="has-header" name="myView"></ion-nav-view>
These show up “Hello” if I put that inside the nav-view, but my tabs never load into the view.
In the relevant state changes, I have ‘myView’ as the target view.
.state('tab.home', {
url: '/home',
views: { 'myView': { templateUrl: 'templates/tab-home.html', controller: 'HomeCtrl' } }
})
And my tab bar is as follows:
<ion-tab title="Home" icon="icon ion-home" href="#/tab/home">
<!--<ion-nav-view name="tab-home"/>-->
</ion-tab>
Here, I’ve tried both leaving the nav view in, and taking it out.
Any help’s appreciated.
Thanks