# AngularJS `ng-if` Directive
[ AngularJS Reference Manual](#)
* * *
## AngularJS Example
Uncheck, and remove content:
Preserve HTML:
Welcome
Welcome to my home.
[Try it Β»](#)
* * *
## Definition and Usage
The **ng-if** directive is used to remove HTML elements when the expression evaluates to false.
If the result of the if statement execution is true, the removed element will be added back and displayed.
The **ng-if** directive is different from ng-hide; ng-hide hides the element, while **ng-if** removes the element from the DOM.
* * *
## Syntax
All HTML elements support this directive.
* * *
## Parameter Values
| Value | Description |
| --- | --- |
| _expression_ | If the expression returns false, the entire element will be removed; if true, the element will be added. |
* * AngularJS Reference Manual](#)