title: Reloading using Angular
body: <p><strong>Hello friends from SO!</strong></p>
  
  <p>I'm new into angular, and I'm trying to keep a table always updated with the information comming from a PHP webservice.</p>
  
  <p>I'm demanding the information the first time using the following:</p>
  
  <p><strong>HTML</strong></p>
  
  <pre><code>&lt;div class="block" ng-controller="demandar_informacion" ng-init="visualizacion_masiva()"&gt;
                      &lt;h1 class="block_header"&gt;Welcome admin&lt;/h1&gt;
                      &lt;p class="block_info"&gt;&lt;/p&gt;
                      &lt;table&gt;
                          &lt;thead&gt;
                              &lt;tr&gt;
                                  &lt;th ng-repeat="header in headers "&gt;{{header}}&lt;/th&gt;
                              &lt;/tr&gt;
                          &lt;/thead&gt;
                          &lt;tr ng-repeat="disponible in disponibles"&gt;
                              &lt;td ng-repeat="(variable, valor) in disponible"&gt;{{valor}}&lt;/td&gt;
                          &lt;/tr&gt;
                      &lt;/table&gt;
                  &lt;/div&gt;
  </code></pre>
  
  <p>Then I'm using the following code to get the information:</p>
  
  <p><strong>Js Angular:</strong></p>
  
  <pre><code>function demandar_informacion($scope, $http) {
  
          //pedido de visualización masiva
          $scope.visualizacion_masiva = function() {
  
              var address = "http://127.0.0.1/usa/_code/index_records.php"
              + "?ac=view_all"
  
              var pedido = $http({
                  method: 'GET',
                  url: address
              })
  
              .success(function(data, status) {
                  $scope.errors = data.error;
                  $scope.headers = data.headers;
                  $scope.disponibles = data.disponibles;
                  $scope.eliminados = data.eliminados;
                  $scope.info = data.info;
              });
  
          };
  
  }
  </code></pre>
  
  <p><strong>Main Q:</strong></p>
  
  <p>Is there any way I could re-send the HTTP packet and update the information every, let's say, 3 or 5 seconds? as It's rapidly changing.</p>
  
  <p><strong>Auxiliary:</strong></p>
  
  <p>At the same time, this fragment of code, seems to be altering the order of the values I have on the array, or it might be previously altered somewhere in the Angular code. I've checked the PHP and the Json string seems to be in right conditions, but when it comes to printing the values, it completely looses it's native order (shows the elements in an improper / unknown order)... anyone has a clue?</p>
  
  <pre><code>&lt;tr ng-repeat="disponible in disponibles"&gt;
                              &lt;td ng-repeat="(variable, valor) in disponible"&gt;{{valor}}&lt;/td&gt;
                          &lt;/tr&gt;
  </code></pre>
  
  <p><strong>Thanks in advance!
  Chris C. Russo</strong></p>