AngularJS ng switch Directive
AngularJS ng-switch Directive
The ng-switch directive is used to hide or show HTML elements depending on an expression. If ng-switch-when directive value gets matched, then child element will get displayed other none of it will be displayed.
Syntax:-
< element ng-switch="expression">
< element ng-switch-when="value" >< /element >
< element ng-switch-when="value" >< /element >
< element ng-switch-default >< /element >
< /element >
Further Explanation:-
Value | Description |
---|---|
expression | An expression that will remove elements with no match, and display elements with a match. |