I\'m trying to understand the difference between ng-if
and ng-show
/ng-hide
, but they look the same to me.
Is there a differenc
One interesting difference in ng-if and ng-show is:
SECURITY
DOM elements present in ng-if block will not be rendered in case of its value as false
where as in case of ng-show, the user can open your Inspect Element Window and set its value to TRUE.
And with a whoop, whole contents that was meant to be hidden gets displayed, which is a security breach. :)