# AngularJS `ng-switch` Directive
[ AngularJS Reference Manual](#)
* * *
Display the corresponding section based on the selected value:
Switch
Select different options to display corresponding values.
[Try it Β»](#)
* * *
## Definition and Usage
The **ng-switch** directive shows or hides the corresponding section based on an expression.
Corresponding child elements use the **ng-switch-when** directive. If they match the selection, they are displayed; otherwise, they are removed.
You can set a default option using the **ng-switch-default** directive. If no matches are found, the default option will be displayed.
* * *
## Syntax
The element supports this attribute.
* * *
## Parameter Values
| Value | Description |
| --- | --- |
| _expression_ | The expression that causes matching items to be displayed and non-matching items to be removed. |
* * AngularJS Reference Manual](#)