import ngModule from '../module'; function vnVisibleBy(aclService) { return { restrict: 'A', priority: -1, link: function($scope, $element, $attrs) { let acls = $attrs.vnVisibleBy.replace(/\s/g, ''); acls = acls.split(','); if (!aclService.hasAny(acls)) $element[0].style.visibility = 'hidden'; } }; } vnVisibleBy.$inject = ['aclService']; ngModule.directive('vnVisibleBy', vnVisibleBy);