Navigate to the root page from a slide box


#1

I have a root page and tapping on one of the item on that root page I landed on the first node . When on the first node I can navigate to next node under same parent by swiping using ionic slide box . but now issue is if i am on the first item on the parent and I swipe right nothing happen . what will be the best way to go to the parent item when swipe right when I am on the 1st node of the parent.

<ion-slide-box on-slide-changed="slideChanged(index)">
     <ion-slide ng-repeat="node in nodes">
         <div></div>       
     </ion-slide>
</ion-slide-box>

Parent Page > 5 nodes

Tap on Parent Page will lead to 1st node and than swipe left to go to 2nd and so on …

Problem: when on the 1st node and swipe right there is no sibling to the left so nothing happen which is expected behavior but how to make sure when swipe right it will land on the parent page . I have router configured to go to parent page but now sure about how track the swipe right event on 1st node . So that i can move back to parent .

Thanks! for any suggestion.

navigation setup:

angular.module('mainApp',['ngSanitize', 'ionic','module1', 'module2'])
   .config(function ( $stateProvider, $httpProvider ){
       $stateProvider
        .state( 'mainpage', {
            url: '',
            controller: 'mainpageCtrl',
            templateUrl: 'pages/main.html'
        })
})