title: AngularJS: ng-switchs removed data from input fields
body: <p>I have a Laravel application and I want to add users an schools through wizards. I have made a very simple wizard with AngularJS.</p>
  
  <pre><code>$scope.addSchool = {
      items : [ 1, 2, 3 ],
      current : 1,
      progress : 0
  }
  
  $scope.addSchoolNext = function(next)
  {
      $scope.addSchool.current = next;
      $scope.addSchool.progress = (100 / $scope.addSchool.items.length) * ($scope.addSchool.current - 1);
  }
  
  $scope.addSchoolPrevious = function(previous)
  {
      $scope.addSchool.current = previous;
      $scope.addSchool.progress = (100 / $scope.addSchool.items.length) * ($scope.addSchool.current - 1);
  }
  </code></pre>
  
  <p>I have ng-switch in my view:</p>
  
  <pre><code> &lt;div class="create-school-wizard" ng-switch on="addSchool.current"&gt;
        &lt;section class="create-school-wizard-1" ng-switch-when="1"&gt;
             Add data
             &lt;button class="btn btn-default" ng-click="addSchoolNext(2)"&gt;Next&lt;/button&gt;
         &lt;/section&gt;
         &lt;section class="create-school-wizard-2" ng-switch-when="2"&gt;
              Add data
              &lt;button class="btn btn-default" ng-click="addSchoolPrevious(1)"&gt;Previous&lt;/button&gt;
              &lt;button class="btn btn-default" ng-click="addSchoolNext(2)"&gt;Next&lt;/button&gt;
         &lt;/section&gt;
         &lt;section class="create-school-wizard-3" ng-switch-when="3"&gt;
              Add data
              &lt;button class="btn btn-default" ng-click="addSchoolPrevious(2)"&gt;Previous&lt;/button&gt;
              &lt;button class="btn btn-default"&gt;Save&lt;/button&gt;
          &lt;/section&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>It works fine! I have just one problem. When I go the the next page and then go back, the input fields are empty. Actually, I dont want to save my inputy data in AngularJS models because of, Laravel takes care for posting and saving the data.</p>
  
  <p>I also tried ng-show, but ng-show submits the entire form when I click on next.</p>