reactivate swipeback when leaving a view where swipeback is not enabled

This commit is contained in:
Gabriel Bazán 2017-02-23 14:26:05 -05:00
commit 91b62bb884
8 changed files with 53 additions and 9 deletions

View file

@ -46,6 +46,10 @@ angular.module('copayApp.controllers').controller('completeController', function
});
};
$scope.$on("$ionicView.beforeLeave", function() {
$ionicConfig.views.swipeBackEnabled(true);
});
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.score = (data.stateParams && data.stateParams.score) ? parseInt(data.stateParams.score) : null;
$scope.skipped = (data.stateParams && data.stateParams.skipped) ? true : false;

View file

@ -41,6 +41,10 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
if (goHome) $state.go('tabs.home');
};
$scope.$on("$ionicView.beforeLeave", function(event, data) {
$ionicConfig.views.swipeBackEnabled(true);
});
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.isCordova = platformInfo.isCordova;
$scope.score = (data.stateParams && data.stateParams.score) ? parseInt(data.stateParams.score) : null;