Fix QR scanner from directive
This commit is contained in:
parent
0a8f1acbe2
commit
2e82dfa0a8
4 changed files with 13 additions and 6 deletions
|
|
@ -364,7 +364,7 @@ angular.module('copayApp.controllers').controller('importController',
|
|||
}, 10);
|
||||
};
|
||||
|
||||
$scope.$on("$ionicView.beforeEnter", function(event, data) {
|
||||
$scope.$on("$ionicView.afterEnter", function(event, data) {
|
||||
$scope.init();
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -20,12 +20,17 @@ angular.module('copayApp.directives')
|
|||
$state.go('scanner', { passthroughMode: 1 });
|
||||
};
|
||||
|
||||
$rootScope.$on('$ionicView.afterEnter', function() {
|
||||
var afterEnter = $rootScope.$on('$ionicView.afterEnter', function() {
|
||||
if($rootScope.scanResult) {
|
||||
scope.onScan({ data: $rootScope.scanResult });
|
||||
$rootScope.scanResult = null;
|
||||
}
|
||||
});
|
||||
|
||||
// Destroy event
|
||||
scope.$on('$destroy', function(){
|
||||
afterEnter();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
|
|
|
|||
|
|
@ -336,7 +336,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
url: '/import',
|
||||
views: {
|
||||
'tab-home@tabs': {
|
||||
templateUrl: 'views/import.html'
|
||||
templateUrl: 'views/import.html',
|
||||
controller: 'importController'
|
||||
},
|
||||
},
|
||||
})
|
||||
|
|
@ -788,7 +789,8 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr
|
|||
url: '/import',
|
||||
views: {
|
||||
'onboarding': {
|
||||
templateUrl: 'views/import.html'
|
||||
templateUrl: 'views/import.html',
|
||||
controller: 'importController'
|
||||
},
|
||||
},
|
||||
params: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue