Google News
logo
AngularJS - Interview Questions
Explain ng-show directive.
ng-show directive shows a given control.

In below example, we've added ng-show attribute to a HTML button and pass it a model. Then we've attached the model to a checkbox and can see the variation.

<input type = "checkbox" ng-model = "showBtn">Free Time Learn
<button ng-show = "showBtn">Click Me!</button>

Advertisement