Article
home/blog/Loading

Using ng-switch in AngularJS

ngSwitch is the equivalent of a switch in java or other modern languages

More Info: ngSwitch

Usage example

<div ng-switch="variable">
    <div ng-switch-when="true">1</div>
    <div ng-switch-when="false">2</div>
    <div ng-switch-when="5000">3</div>
    <div ng-switch-default="5000">default</div>
</div>