using directives - ng-show and ng-hide usage in AngularJS -


i aware of difference between ng-show , ng-hide asked question in interview why need ng-hide if have ng-show because know both shows or hides given html element based on values can true or false. reason should favor ng-show on ng-hide or vice versa?

readability.

ng-show="feature.enabled" more readable ng-hide="!feature.enabled". double negations harder understand.


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -