Hello,
I have a problem with the Swipe to go Back feature.
When I move to a View I’m not able to go back with swiping.
Testing on iOS Device with Ionic View
sidemenu allows swipe to go back on Ionic View
My index.html
<body ng-app="starter">
<ion-nav-bar class="bar-positive">
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-nav-view name="layout"></ion-nav-view>
</body>
My App route
$stateProvider
.state('main#index', {
url: "/main-index",
views: {
'layout': {
templateUrl: "modules/main/views/index.html",
controller: "main_index",
}
},
})
/* etc ... same way */
$urlRouterProvider.otherwise("/main-index");
The index.html of module main
<ion-view view-title="Title">
<ion-content>
<some element ng-click="goto($index)">
</ion-content>
</ion-view>
Controller:
$scope.goto = function(index) {
$state.transitionTo("main#details", {
obj: JSON.stringify($scope.items[index])
});
};
How can I make it work or what I’m doing wrong?