Wallet/src/js/directives/actionSheet.js
Marty Alcala 22d4a92f7d Revert "Revert "Scan handling""
This reverts commit 641091e7d9.
2016-10-26 14:00:43 -04:00

26 lines
708 B
JavaScript

'use strict';
angular.module('copayApp.directives')
.directive('actionSheet', function($rootScope, $timeout) {
return {
restrict: 'E',
templateUrl: 'views/includes/actionSheet.html',
transclude: true,
scope: {
show: '=actionSheetShow',
},
link: function(scope, element, attrs) {
scope.$watch('show', function() {
if(scope.show) {
$timeout(function() { scope.revealMenu = true; }, 100);
} else {
scope.revealMenu = false;
}
});
scope.hide = function() {
scope.show = false;
$rootScope.$broadcast('incomingDataMenu.menuHidden');
};
}
};
});