Reputation: 61
Like what we have in C# (mutliple values with the same output)
switch (CommandId)
{
case 1:
case 2:
.
.
.
{
return "test";
}
}
I want to have 2 or more cases with the same output in angularjs
<div ng-switch="ctrl.Step">
<button class="md-raised md-primary" ng-switch-when="1" ng-click="ctrl.save()">
Save
</button>
<button class="md-raised md-primary" ng-switch-when="2" ng-click="ctrl.save()">
Save
</button>
</div>
What is the syntax for such code?
Upvotes: 1
Views: 164