You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
825 B
28 lines
825 B
thinwalletDirectives.directive('showModal', function(ModalService) {
|
|
return {
|
|
link: function(scope, element, attrs) {
|
|
var modal = attrs.showModal;
|
|
element.click(function() {
|
|
scope.$apply(function() {
|
|
ModalService.show(modal);
|
|
});
|
|
});
|
|
}
|
|
};
|
|
});
|
|
|
|
thinwalletDirectives.directive('hideModal', function(ModalService) {
|
|
return {
|
|
link: function(scope, element, attrs) {
|
|
var modal = attrs.hideModal;
|
|
if(!modal) {
|
|
modal = element.parents('[modal-name]').attr('modal-name');
|
|
}
|
|
element.click(function() {
|
|
scope.$apply(function() {
|
|
ModalService.hide(modal);
|
|
});
|
|
});
|
|
}
|
|
};
|
|
}); |