What is the difference between ng-if, ng-show/ng-hide?

by dion.waelchi , in category: Technology , 4 years ago

What is the difference between ng-if, ng-show/ng-hide?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by trycia.jones , 4 years ago

Based on the expression’s boolean result, the ng-if directive removes or recreates the element in the dom. If the expression resolves to true it removes the element from the dom otherwise a clone of the element gets inserted.

Based on the expression’s boolean result,ng-show directive hides or shows the element in the dom. If the expression resolves to false it hides the element by adding ng-hide css class on the element otherwise the class is removed from the element.

Related Threads:

What is difference Between PHP 5 and 7?
What is the difference between Serializable and parseable?
What is difference between stock and share?
What is difference between Oracle and SQL?
What are the difference between GUI and CLI?
What is difference between md5 and SHA256?