Angularjs ng-switch Instruction
Displays the corresponding section according to the selected value:
Definitions and usage
The ng-switch instruction displays or hides the corresponding part based on an expression.
The corresponding child element uses the ng-switch-when instruction, and if the matching check selection is displayed, the other matches are removed.
You can set the default option by using the Ng-switch-default directive, and if there are no matches, the default option is displayed.
Grammar
<element ng-switch= "expression" >
<element ng-switch-when= "value" ></element>
< Element ng-switch-when= "value" ></element>
<element ng-switch-when= "value" ></element>
<element ng-switch-default></element>
</element>
The <form> element supports this property.
Parameter values
value |
Description |
Expression |
An expression makes a match appear and the mismatch is removed. |
Above is the detailed introduction of the Angularjs Ng-switch instructions, follow-up continue to add, thank you for your support to this site!