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
ngIf makes a manipulation on the DOM by removing or recreating the element.
Whereas ngShow applies a css rules to hide/show things.
For most of the cases (not always), I would summarize this as, if you need a one time check to show/hide things, use ng-if
, if you need to show/hide things based on the user actions on the screen (like checked a checkbox then show textbox, unchecked then hide textbox etc..), then use ng-show