The ng-show directive controls the visibility of an HTML element by showing or hiding it.
<div ng-app=””> <p ng-show=”true”>I am visible.</p> <p ng-show=”false”>I am not visible.</p> </div> |
The ng-show
directive controls the visibility of an HTML element based on its value, allowing any expression that evaluates to true or false.
<div ng-app=”” ng-init=”hour=13″> <p ng-show=”hour > 12″>I am visible.</p> </div> |
The ng-hide directive hides (or shows) an HTML element.
<div ng-app=””> <p ng-hide=”true”>I am not visible.</p> <p ng-hide=”false”>I am visible.</p> </div> |