angularjs: multiple values in a ng-switch-when

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

I have the following ngSwitch:

Wrong

7条回答
  •  [愿得一人]
    2021-02-11 12:52

    You can't have multiple conditions with a single ng-switch-when.

    One alternative is to use an ng-if, but in the case of error handling, I prefer to populate an error variable on the scope in the controller, and use ng-show=error.

提交回复
热议问题