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

@ -2,12 +2,18 @@
angular.module('copayApp.controllers').controller('welcomeController', function($scope, $state, $timeout, $ionicConfig, $log, profileService, startupService, storageService) {
$ionicConfig.views.swipeBackEnabled(false);
$scope.$parent.$on("$ionicView.afterEnter", function() {
startupService.ready();
});
$scope.$on("$ionicView.beforeEnter", function() {
$ionicConfig.views.swipeBackEnabled(false);
});
$scope.$on("$ionicView.beforeLeave", function() {
$ionicConfig.views.swipeBackEnabled(true);
});
$scope.createProfile = function() {
$log.debug('Creating profile');
profileService.createProfile(function(err) {