change event to rootscope
This commit is contained in:
parent
eba3fef935
commit
32ae89046d
2 changed files with 5 additions and 5 deletions
|
|
@ -25,13 +25,13 @@ angular.module('copayApp.controllers').controller('walletHomeController', functi
|
|||
this.isMobile = isMobile.any();
|
||||
|
||||
var disableScannerListener = $rootScope.$on('dataScanned', function(event, data) {
|
||||
$scope.$emit('Local/SetTab', 'send');
|
||||
self.setForm(data);
|
||||
$rootScope.$emit('Local/SetTab', 'send');
|
||||
});
|
||||
|
||||
var disablePaymentUriListener = $rootScope.$on('paymentUri', function(event, uri) {
|
||||
$timeout(function() {
|
||||
$scope.$emit('Local/SetTab', 'send');
|
||||
$rootScope.$emit('Local/SetTab', 'send');
|
||||
self.setForm(uri);
|
||||
}, 100);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -443,16 +443,16 @@ angular
|
|||
url: '/cordova/:status',
|
||||
views: {
|
||||
'main': {
|
||||
controller: function($scope, $stateParams, go) {
|
||||
controller: function($rootScope, $stateParams, go) {
|
||||
switch ($stateParams.status) {
|
||||
case 'resume':
|
||||
$scope.$emit('Local/Resume');
|
||||
$rootScope.$emit('Local/Resume');
|
||||
break;
|
||||
// case 'online':
|
||||
// // $scope.$emit('Local/Online');
|
||||
// break;
|
||||
case 'offline':
|
||||
$scope.$emit('Local/Offline');
|
||||
$rootScope.$emit('Local/Offline');
|
||||
break;
|
||||
};
|
||||
go.walletHome();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue