title: trying to use ngSwitch in angular
body: <p>I'm testing the following code in angular and it's not working. I'm very new to Angular and I've been unable to figure this out. All I'm trying to do is show a particular element based on a step number when next/back buttons are clicked.</p>
  
  <pre><code>  &lt;div ng-app ng-controller="Ctrl"&gt;
      &lt;div ng-switch on="selection" &gt;
          &lt;div ng-switch-when="2" step-number="2"&gt;Settings Div&lt;/div&gt;
          &lt;span ng-switch-when="1" step-number="1"&gt;Home Span&lt;/span&gt;
          &lt;span ng-switch-default step-number="3"&gt;default&lt;/span&gt;
          &lt;button ng-click="back(step-number)"&gt;back&lt;/button&gt;
          &lt;button ng-click="forward(step-number)"&gt;forward&lt;/button&gt;
      &lt;/div&gt;   
   &lt;/div&gt;
  
  function Ctrl($scope) {
      $scope.items = ['1', '2', '3'];
      $scope.forward = function($selected) { $scope.selection = $scope.items[$selected - 1]; };
      $scope.back = function($selected) { $scope.selection = $scope.items[$selected - 1]; };
  }
  </code></pre>