adding controllers to route file, moving swipe back enable to enter event
This commit is contained in:
parent
91b62bb884
commit
14baa77404
15 changed files with 50 additions and 34 deletions
|
|
@ -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!";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue