adding controllers to route file, moving swipe back enable to enter event

This commit is contained in:
Gabriel Bazán 2017-03-03 10:36:19 -03:00
commit 14baa77404
15 changed files with 50 additions and 34 deletions

View file

@ -45,15 +45,16 @@ angular.module('copayApp.controllers').controller('sendController', function($sc
$ionicConfig.views.swipeBackEnabled(true);
});
$scope.$on("$ionicView.enter", function(event, data) {
if ($scope.score)
$ionicConfig.views.swipeBackEnabled(false);
});
$scope.$on("$ionicView.beforeEnter", function(event, data) {
$scope.isCordova = platformInfo.isCordova;
$scope.score = (data.stateParams && data.stateParams.score) ? parseInt(data.stateParams.score) : null;
$scope.feedback = {};
if ($scope.score) {
$ionicConfig.views.swipeBackEnabled(false);
}
switch ($scope.score) {
case 1:
$scope.reaction = "Ouch!";