adding reverse animation to finish button

This commit is contained in:
Gabriel Bazán 2016-11-25 10:14:01 -03:00
commit c71e3bc0e4
2 changed files with 10 additions and 2 deletions

View file

@ -1,6 +1,6 @@
'use strict'; 'use strict';
angular.module('copayApp.controllers').controller('customAmountController', function($rootScope, $scope, $stateParams, txFormatService, platformInfo) { angular.module('copayApp.controllers').controller('customAmountController', function($rootScope, $scope, $stateParams, $ionicHistory, txFormatService, platformInfo) {
$scope.$on("$ionicView.beforeEnter", function(event, data) { $scope.$on("$ionicView.beforeEnter", function(event, data) {
var satToBtc = 1 / 100000000; var satToBtc = 1 / 100000000;
@ -16,4 +16,12 @@ angular.module('copayApp.controllers').controller('customAmountController', func
window.plugins.socialsharing.share(uri, null, null, null); window.plugins.socialsharing.share(uri, null, null, null);
}; };
$scope.finish = function() {
$ionicHistory.nextViewOptions({
disableAnimate: false,
historyRoot: true
});
$ionicHistory.goBack(-2);
};
}); });

View file

@ -6,7 +6,7 @@
<ion-nav-back-button> <ion-nav-back-button>
</ion-nav-back-button> </ion-nav-back-button>
<ion-nav-buttons side="secondary"> <ion-nav-buttons side="secondary">
<button class="button no-border" ui-sref="tabs.receive" translate> <button class="button no-border" ng-click="finish()" translate>
Finish Finish
</button> </button>
</ion-nav-buttons> </ion-nav-buttons>