title: Select inside ng table, when reloading data in ng table the page goes back to top
body: <p>We are using a ng table to render some data on a page. Inside the table a ng-repeater renders line by line values from an array of objects. One of the columns is a select box and its values are taken from an array declared and populated inside the controller.</p>
  
  <p>This is the declaration of the array:</p>
  
  <pre><code>$scope.CharacteristicsToChange = [];
  </code></pre>
  
  <p>This is the population of the array which is somewhere in a method:</p>
  
  <pre><code>if ($scope.ItemProfile.ProductionDateRegistration != 'No')
      $scope.CharacteristicsToChange.push({ Name: 'Production date' });
  
  if ($scope.ItemProfile.BestBeforeDateRegistration != 'No')
      $scope.CharacteristicsToChange.push({ Name: 'Best before date' });
  </code></pre>
  
  <p>And the select box is:</p>
  
  <pre><code>&lt;select class="form-control" id="ddlCharacteristics" ng-options="characteristic.Name as characteristic.Name for characteristic in CharacteristicsToChange" name="Characteristic" ng-model="inventory.SelectedCharacteristic" required&gt;
      &lt;option value="" class="select-placeholder"&gt; Select characteristic type&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Our problem is that when the data for the ng table is reloaded ( every 10 seconds ) and the page is scrolled to the bottom, the page is going back to the top.</p>
  
  <p>I think that the problem is the array from where we take the values for select ( $scope.CharacteristicsToChange ), because when I deleted the population part of this array, the reloading problem had not occurred anymore.</p>