Switch view in ion-nav-view


#1

Hi,

I have a problem with switching view in a ion-nav-view

In fact, my Ionic App has this organisation :

<ion-nav-view> -> in my index.html
     <ion-slide-box>
            <ion-slide ui-view="view1">
                  <ion-nav-view name="view2"></ion-nav-view> -> Here is my problem
            </ion-slide>
     </ion-slide-box>
</ion-nav-view>

My route.js is like :

$stateProvider
        .state('home', {
            url: "/home",
            templateUrl: "partials/users/home.html",
            controller: 'generalCtrl',
            views: {
                'view1@home': {
                    templateUrl: 'view1.html'
                },
                'view2@home': {
                    templateUrl: 'view2.html'
                },
                 'view3@home': {
                    templateUrl: 'view3.html'
                }
            }
        })

My Problem is I would to switch view in my ion-nav-view that contains view2 and put “view3” into for example (with animation) .

But actually :
case 1 : I put a ui-sref=“view2” in my view1.html | result : Could not resolve ‘view2’ from state 'home’
case 2 : I put a ui-sref="^.home2" in my view1.html | result : It switch my first ion-nav-view calling new state (home2)

Thank you for help me :wink:
PS: Sorry for english, I’m french … :blush:


#2

I have exposed my problem here : http://codepen.io/anon/pen/yaLhz

I’ve past the “Scientific Facts” button in the modal (Line 86), but nothing happen when I click on

I want to switch the view inside the Modal with the correct effect (ios7 slide)

Maybe more clear with this example ?


#3

Nobody help me ? :frowning:

Juste navigate inside my ion nav view in a modal ?

I’m trying to define a child scope for my modal but nothing work.

Please help :stuck_out_tongue: