title: My view lost the configuration when refresh
body: <p>I an new in AngularJS and are having a lot of problems to solve some little issues.
  When my view refresh this are losting the configuration. Let me explain better. I have a tab in the top of the view and some labels and texboxes below that. When my code save pup some little configurations from sqlite the ionic forget the tab and the objects rise, being hide by the tab.</p>
  
  <p>Follow the code that is used to call sqlite.</p>
  
  <p>controller</p>
  
  <pre><code>.controller('ClienteDetalheCtrl', ['clientesFactory', '$scope', '$state', '$window', '$rootScope', function (clientesFactory, $scope, $state, $window, $rootScope) {
    buscaEquipamento();
    alteraData();
  
    function buscaEquipamento() {
        clientesFactory.selectTodos('equipamento');
        $scope.selecionaInstalacao = clienteselec;
    }
  </code></pre>
  
  <p>}</p>
  
  <p>sqlite called:</p>
  
  <pre><code> var db = null;
   var clienteselec = [];
   angular.module('sqlite', ['ionic', 'ngCordova'])
  
  .run(function ($ionicPlatform, $cordovaSQLite) {
     $ionicPlatform.ready(function () {
         db = $cordovaSQLite.openDB({ name: "rollers.db", location: 1 });
  
         $cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS clientes (id integer primary key, nome varchar(40), TC int)");
         $cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS instalacao (id integer primary key, idCliente int, dataInst datetime)");
         $cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS manutencao (id integer primary key, idCliente int, idInstalacao int, dataManut datetime)");
         $cordovaSQLite.execute(db, "CREATE TABLE IF NOT EXISTS equipamento (id integer primary key, idCliente int, idInstalacao int, idManutencao int, TC int, posicao varcar(1), Rolo varchar(40), dataEquip datetime)");
      });
  })
  
  .factory('clientesFactory', function ($ionicPlatform, $cordovaSQLite) {
  
          selectTodos: function (tab) {
              var query = "SELECT * FROM " + tab;
  
              clienteselec = [];
              $cordovaSQLite.execute(db, query, []).then(function (result) {
                  if (result.rows.length) {
                      for (var i = 0; i &lt; result.rows.length; i++) {
                          clienteselec.push(result.rows.item(i));
                      }
                  } else {
                      console.log("no data found!");
                  }
              }, function (err) {
                  console.log("error" + err);
              });
          },
  });
  </code></pre>
  
  <p>The view where the informations will be showed:</p>
  
  <pre><code>&lt;ion-header&gt;
  
    &lt;ion-navbar&gt;
      &lt;ion-title&gt;Instalacao&lt;/ion-title&gt;
    &lt;/ion-navbar&gt;
  
  &lt;/ion-header&gt;
  
  
  &lt;ion-content padding&gt;
    &lt;label class="item item-input"&gt;
        &lt;span class="input-label"&gt;Cliente:&lt;/span&gt;
        &lt;input type="text" id="TxtCli" disabled /&gt;
    &lt;/label&gt;
    &lt;label class="item item-input"&gt;
        &lt;span class="input-label"&gt;TC&lt;/span&gt;
        &lt;input type="text" id="TxtTC"/&gt;
    &lt;/label&gt;
    &lt;label class="item item-input"&gt;
        &lt;span class="input-label"&gt;Data:&lt;/span&gt;
        &lt;input type="text" id="TxtData" disabled /&gt;
    &lt;/label&gt;
    &lt;label class="item item-input"&gt;
        &lt;span class="input-label"&gt;Hora:&lt;/span&gt;
        &lt;input type="text" id="TxtHora" disabled /&gt;
    &lt;/label&gt;
  
    &lt;div ng-controller="ClienteDetalheCtrl"&gt;
       &lt;ion-item ng-repeat="inst in selecionaInstalacao"&gt;
           {{inst.TC}}, {{inst.posicao}}, {{inst.Rolo}}, {{inst.dataEquip}}
       &lt;/ion-item&gt;
       &lt;ion-item ng-show="!selecionaInstalacao.length"&gt;No events&lt;/ion-item&gt;
    &lt;/div&gt;
        &lt;button ng-click="alteraInstalacao()"&gt;Altera&lt;/button&gt;
  &lt;/ion-content&gt;
  </code></pre>
  
  <p>I need to make it work in the refresh of page, because i need to populate the grid bellow the textboxes.
  I would be very grateful if anyone could help me. Thank you everyone.</p>