Make directive to accept onScan and beforeScan callbacks instead of broadcasting 'dataScanned' event.
This will allow to reuse directive for screens different from 'send'
This commit is contained in:
parent
b673540638
commit
1f4f78bec0
3 changed files with 21 additions and 8 deletions
|
|
@ -1,6 +1,14 @@
|
|||
'use strict';
|
||||
|
||||
angular.module('copayApp.controllers').controller('topbarController', function($rootScope, $scope, $timeout, $modal, isCordova, isMobile, go) {
|
||||
angular.module('copayApp.controllers').controller('topbarController', function($rootScope, go) {
|
||||
|
||||
this.onQrCodeScanned = function(data) {
|
||||
$rootScope.$emit('dataScanned', data);
|
||||
};
|
||||
|
||||
this.openSendScreen = function() {
|
||||
go.send();
|
||||
};
|
||||
|
||||
this.goHome = function() {
|
||||
go.walletHome();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue