Is it possible to have an OR in ng-switch-when?
<div ng-repeat="w in windows" ng-show="visibleWindowId == w.id" ng-switch="w.type">
<div ng-switch-when="val1 **OR** val2">
sup
</div>
</div>
If not, how could the above be accomplished?
Thanks :)
ngswitch
only allows you to compare a single condition.
I you are looking to test multiple conditions you can use ng-if
available with version 1.1.5
It is important to note that using ng-if
and ng-switch
remove the element from the DOM structure, opposed to show and hide.
This is important when you traverse the DOM to find elements.