How to use ng-show and ng-hide in angular js?



How to use ng-show and ng-hide in angular js?..

Answer / Vibha Mishra

ng-show and ng-hide are used to show or hide HTML elements based on a condition. To hide an element, use ng-hide="expression", and to show it again, change the expression to false. Similarly, for ng-show, use ng-show="expression". The difference between these two is that ng-hide makes the element invisible while taking up space in the DOM, while ng-show removes it from the DOM entirely.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More AngularJS Interview Questions

How to write increment counter in angular js?

1 Answers  


Explain ng-include directive in angularjs?

1 Answers  


How do I know what version of angular I have?

1 Answers  


What is $emit, $broadcast and $on in AngularJS?

1 Answers  


What is angular 5? What’s new in angular 5?

1 Answers  


What are the filters in angular js?

1 Answers  


Explain angular 2 hidden property?

1 Answers  


What is the use of filter in angularjs?

1 Answers  


What is the urlsegment interface in angular 7?

1 Answers  


What is embedded view in angular?

1 Answers  


What is attribute in angular?

1 Answers  


What is data binding in AngularJS?

1 Answers   SLK Software,


Categories