I have the following code:
personal-info.html
<ion-view view-title="Personal Information">
<ion-nav-buttons side="left">
<button class="button button-icon icon ion-ios-arrow-left" ng-click="doTheBack()" nav-direction="back"></button>
</ion-nav-buttons>
<ion-content class="padding" on-swipe-right="swipe('right')">
<div class="list card">
<div class="item item-divider">Recent Updates</div>
<div class="item item-body">
<div>
There is a fire in <b>sector 3</b>
</div>
</div>
</div>
</ion-content>
</ion-view>
and my controller
.controller('PersonalInfoCtrl', function($scope,$ionicNavBarDelegate) {
$scope.swipe = function (direction) {
if(direction == 'right')
$ionicNavBarDelegate.back();
}
$scope.doTheBack = function() {
window.history.back();
};
});
The code above works but I want to be able to swipe back with a nice transition just like the native iOS transition. I have read that this feature comes by default with the framework but somehow it doesn’t work for my app.