Introduction:-
Some people are only using ng-show instead of ng-hide="!true" Or some peoples are using ng-hide instead of ng-show="!true". Technically we don't need ng-hide directive. But! I know angular introduced ng-hide for standard coding structure. And please understand me, I am asking about the performance not difference.
My Question:-
So my question is what about the performance of this following scenarios?
ng-hide="true"vs.ng-show ="!true"ng-show="true"vs.ng-hide="!true";
No different performance between
ng-hidevsng-show. It just uses CSS to show/hide the element.Similar for
ng-show:You should compare
ng-show(show element use CSS) vsng-if(add element to DOM) about performance.