title: Ionic + cordova-sqlite-storage + deviceready = No render on transition?
body: <p>Since adding the cordova-sqlite-storage plugin and refactoring controllers to something like the following I am seeing strange behavior on transitions between tabs.</p>
  
  <pre><code>angular.module('blah.controllers').controller('EquipmentCtrl', ['$scope', '$state', 'EquipmentService', 'UtilService', function($scope, $state, EquipmentService, UtilService) {
  
      document.addEventListener("deviceready", getRowsFromDb, false);
  
      function getRowsFromDb() {
          EquipmentService.getAllEquipment().then(function(rows) {
  
              $scope.equipmentList = rows;
              $scope.equipmentRows = UtilService.chunkArray($scope.equipmentList, 3);
          });
      }    
  }]);
  </code></pre>
  
  <p>Everything works/looks great on initial page load but when I transition between tabs I don't see the data from sqlite on the page until I tap the same tab a second time.  </p>
  
  <p>The page will load as far as showing static data (title, other text, etc) but I won't see the data returned from sqlite until the second tap of the current tab.  I am wondering if 'deviceready' is firing after the page has loaded but I am not sure how to combat that.  </p>
  
  <p>I tried <a href="https://stackoverflow.com/a/27450072/59975">this solution</a> but didn't see any difference in behavior.</p>
  
  <p>Has anybody else run into this and if so, what's the best plan of attack?</p>