-
-
Save neopablix/38ed0d28d8fcac1905a5ba76da531ab1 to your computer and use it in GitHub Desktop.
ngVisible angular directive
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.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