angularjs: multiple values in a ng-switch-when

前端 未结 5 1876
不知归路
不知归路 2021-02-11 12:03

I have the following ngSwitch:

Wrong

5条回答
  •  孤城傲影
    2021-02-11 12:31

    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.

提交回复
热议问题