Wallet/src/js/directives/itemSelector.js
2016-12-27 16:55:48 -03:00

25 lines
612 B
JavaScript

'use strict';
angular.module('copayApp.directives')
.directive('itemSelector', function($timeout) {
return {
restrict: 'E',
templateUrl: 'views/includes/itemSelector.html',
transclude: true,
scope: {
show: '=itemSelectorShow',
onSelect: '=itemSelectorOnSelect'
},
link: function(scope, element, attrs) {
scope.hide = function() {
scope.show = false;
};
scope.sendMax = function() {
$timeout(function() {
scope.hide();
}, 100);
scope.onSelect();
};
}
};
});