title: AngularJS ng-repeat on update not working
body: <p>I'm trying to display elements from an array in HTML that I push values into. The values are just basic strings.</p>
  
  <p>This is the code where the database is set:</p>
  
  <pre><code>$scope.loadcourse = function() {
  
  var db = null;
  document.addEventListener("deviceready", function(){
  db = window.sqlitePlugin.openDatabase({name: "note.db"});
  db.transaction(function(tx) {
      tx.executeSql("CREATE TABLE IF NOT EXISTS note (name text primary key, data text)");
      alert("Loaded DB");
  }, function(err){
      alert("An error occurred while initializing the app");
  });
  
  $scope.$apply(function(){
    $scope.courseDB = ["1","2"];
  });
  
  db.transaction(function(tx) {
        tx.executeSql("SELECT (name) FROM note", [], function(tx,res){
            for(var iii = 0; iii &lt; res.rows.length; iii++)
            {
                $scope.courseDB.push(res.rows.item(iii).name);
                alert($scope.courseDB);
            }
        });
    }, function(err){
        alert("An error occured while displaying saved notes");
    });
  
  
  }, false);
  
  }
  </code></pre>
  
  <p>This is how I display the entries:</p>
  
  <pre><code>&lt;ion-content ng-controller="FeedController" ng-init="loadcourse()" class="has-tabs-top"&gt;
  
      &lt;ion-list&gt;
        &lt;ion-item ng-repeat="entry in courseDB"&gt;
          Hello, {{entry}}!
        &lt;/ion-item&gt;
      &lt;/ion-list&gt;
  
    &lt;/ion-content&gt;
  </code></pre>
  
  <p>Now, the thing that doesn't make sense, is that it only displays the two dummy values (1 and 2), but does not display the elements that get added in the push-function inside the loadCorse function - even though the element that gets pushed into the array, is visible inside the alert popup that appears!</p>
  
  <p>I'm almost 100% sure that I'm just missing one small stupid detail here.</p>
  
  <p><strong>UPDATE</strong></p>
  
  <p>This is how the array looks on alert: (no brackets)</p>
  
  <p>1, 2, Textstring, Textstring, Textstring</p>