How to swipe back -1 history

So I have an app with 2 views,

  1. one view with a basic ng-repeat to list some items
  2. a detail view

So from the list view I can tap on an item and then go to the detail view. I can see top left (in the header) the “back” text and “<” icon, so when I click on it I go back -1 history. All goes well.

Now I want to swipe left on the detail page, to do the back -1 history. Any ideas how to approach this?

found it!

<ion-view view-title="" on-swipe-left="onSwipeLeft()" >

in controller

    $scope.onSwipeLeft  = function() {
        $ionicHistory.goBack();
    };
1 Like