feat(scan): first iteration of full scan view implementation

This commit is contained in:
Jason Dreyzehner 2016-10-11 02:59:21 -04:00
commit c0d4fbe5bb
5 changed files with 106 additions and 50 deletions

View file

@ -1,7 +1,7 @@
'use strict';
angular.module('copayApp.directives')
.directive('qrScanner', function($state, $rootScope, $log) {
.directive('qrScanner', function($state, $rootScope, $log, $ionicHistory) {
return {
restrict: 'E',
@ -9,11 +9,14 @@ angular.module('copayApp.directives')
onScan: "&"
},
replace: true,
template: '<a on-tap="openScanner()"><i class="icon ion-qr-scanner"></i></a>',
template: '<a on-tap="openScanner()" nav-transition="none"><i class="icon ion-qr-scanner"></i></a>',
link: function(scope, el, attrs) {
scope.openScanner = function() {
$log.debug('Opening scanner by directive...');
$ionicHistory.nextViewOptions({
disableAnimate: true
});
$state.go('scanner', { passthroughMode: 1 });
};