Define ng-if ng-show and ng-hide.

ng-if directive is used as if clause which removes the HTML element if the expression becomes false.

Syntax

<element ng-if=” expression”></element>

ng-show directive is used to show the HTML element if the expression becomes true. And if the expression becomes false then the HTML element will be hidden.

Syntax

<element ng-show=” expression”></element>

ng-hide directive is used to hide the HTML element if the expression becomes false.

Syntax

<element ng-hide=”expression”></element>

Both ng-show and ng-hide uses the display property method.

Top 50+ Angular Interview Questions with Answers

Angular is one of the most current web development frameworks around the world.  In almost every interview, you will have… Read More

4 years ago