title: $urlRouterProvider.otherwise doesn't recognize $cordovaSQLite.execute(db, query, []) in a function of a controller
body: <p>I have a state in my app.js :</p>
  
  <pre><code>.state('app.kamus', {
      url: '/kamus',
      views: {
          'menuContent': {
              templateUrl: 'templates/kamus.html',
              controller: 'Kamus1Ctrl'
          }
      }
  })
  ...
  </code></pre>
  
  <p>and :</p>
  
  <pre><code>$urlRouterProvider.otherwise('/app/kamus');
  </code></pre>
  
  <p>controller : </p>
  
  <pre><code>.controller('Kamus1Ctrl', function($scope, $cordovaSQLite, $ionicLoading, $stateParams, $timeout) {
  
  $ionicLoading.show({
      content: 'Loading',
      animation: 'fade-in',
      showBackdrop: true,
      maxWidth: 200,
      showDelay: 0
  });
  
  $scope.selectAll = function() {
      $scope.datas = [];
      var query = "SELECT * FROM data";
      $cordovaSQLite.execute(db, query, []).then(function(res) {
          $scope.datas = [];
          if (res.rows.length &gt; 0) {
              for (var i = 0; i &lt; res.rows.length; i++) {
  
                  $scope.datas.push(res.rows.item(i));
              }
          } else {
              console.log("No results found");
          }
      }).finally(function() {
          $ionicLoading.hide();
      });
  }
  $scope.selectAll();
  </code></pre>
  
  <p>})</p>
  
  <p>I direct the $urlRouterProvider.otherwise to /app/kamus to show kamus page in first launch of my application. But it seems $urlRouterProvider.otherwise is failed to execute $cordovaSQLite.execute(db, query, []) in my selectAll() function on Kamus1Ctrl.</p>
  
  <p>But when I use other pages as my $urlRouterProvider.otherwise, i.e : $urlRouterProvider.otherwise('app/other'), then I go to /app/kamus via my side menu(button ui-sref="app.kamus"), it just works.</p>
  
  <p>How to fix this problem?</p>