angularjs: multiple values in a ng-switch-when

前端 未结 7 1733
一向
一向 2021-02-11 11:59

I have the following ngSwitch:

Wrong

相关标签:
7条回答
  • 2021-02-11 12:55

    You can add another switch case.

    Example:

    <p ng-switch="status">
        <span ng-switch-when="wrong">
           Wrong
        </span>
    <span ng-switch-when="incorrect">
           Wrong
        </span>
        <span ng-switch-default>
           Correct
        </span>
    </p>
    

    Live example: http://jsfiddle.net/choroshin/Zt2qE/2/

    0 讨论(0)
提交回复
热议问题