Skip to content

Instantly share code, notes, and snippets.

@neopablix
Forked from c0bra/gist:5859295
Created September 28, 2017 12:11
Show Gist options
  • Save neopablix/38ed0d28d8fcac1905a5ba76da531ab1 to your computer and use it in GitHub Desktop.
Save neopablix/38ed0d28d8fcac1905a5ba76da531ab1 to your computer and use it in GitHub Desktop.
ngVisible angular directive
.directive('ngVisible', function () {
return function (scope, element, attr) {
scope.$watch(attr.ngVisible, function (visible) {
element.css('visibility', visible ? 'visible' : 'hidden');
});
};
})
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment