What's the difference between `ng-show` and `ng-hide`?

后端 未结 5 1444
天命终不由人
天命终不由人 2020-12-11 18:08

These attributes are both given either a true or false value, so what difference is there between them? It would make sense if there weren\'t value

5条回答
  •  醉梦人生
    2020-12-11 18:27

    Also worth mentioning is ng-if which takes a boolean expression just like ng-show and ng-hide but rather than just showing/hiding the elements depending on the expression, it completely removed the element from the DOM if the expression is false and put the element back in the DOM if the expression becomes true

提交回复
热议问题