javascripthtmlangularjsng-showng-hide

Angular ng-hide or ng-show ? why?


I have seen this questions many times, but not once have I seen a normal answer.

What is the difference between ng-hide and ng-show? is there one? if so when to use one or the other ( I understand ng-if, I am asking only about this two).

I hope some one knows thanks.


Solution

  • As we know angularjs is a two way databinding. ng-hide and ng-show is we used for two different purpose one for hide and another for show. for example if you use one method that returns true or false. In any case hide of one element you want to show other then you need to use only one method for both hide and show.