add addressbook entry when send success
This commit is contained in:
parent
89362ef929
commit
ef90113dd8
9 changed files with 126 additions and 37 deletions
|
|
@ -1,9 +1,11 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('addressbookAddController', function($scope, $state, $timeout, addressbookService, popupService) {
|
||||
angular.module('copayApp.controllers').controller('addressbookAddController', function($scope, $state, $stateParams, $timeout, $ionicHistory, addressbookService, popupService) {
|
||||
|
||||
$scope.fromSendTab = $stateParams.fromSendTab;
|
||||
|
||||
$scope.addressbookEntry = {
|
||||
'address': '',
|
||||
'address': $stateParams.addressbookEntry || '',
|
||||
'name': '',
|
||||
'email': ''
|
||||
};
|
||||
|
|
@ -28,9 +30,15 @@ angular.module('copayApp.controllers').controller('addressbookAddController', fu
|
|||
popupService.showAlert(err);
|
||||
return;
|
||||
}
|
||||
$state.go('tabs.addressbook');
|
||||
if ($scope.fromSendTab) $scope.goHome();
|
||||
else $state.go('tabs.addressbook');
|
||||
});
|
||||
}, 100);
|
||||
};
|
||||
|
||||
$scope.goHome = function() {
|
||||
$ionicHistory.clearHistory();
|
||||
$state.go('tabs.home');
|
||||
};
|
||||
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue