Q:

how to display data from sqlite into list using ng-repeat angularjs ionic

I am using this code and unable to figure out how to populate the data form the database into an ionic list
$scope.selectAll = function() {
    $scope.allSessions= [];
    var query = "SELECT * FROM tb_sessions7";
    $cordovaSQLite.execute(db, query, []).then(function(res) {
        if(res.rows.length > 0) {
             console.log("SELECTED -> " + res.rows.item(0).name + " " + res.rows.item(0).amount);
             for (var i=0; i<res.rows.length; i++) {
                $scope.allSessions.push(res.rows.items(i).name);
                //console.log("data->"+$scope.allSessions);
             }
        } else {
            console.log("No results found");
        }
    }, function (err) {
        console.error(err);
    });
}

A:

finally i got solution
$scope.selectAll = function() {

    var query = "SELECT * FROM tb_sessions7";
    $cordovaSQLite.execute(db, query, []).then(function(res) {

        if(res.rows.length > 0) {
             console.log("SELECTED -> " + res.rows.item(0).id + " " + res.rows.item(0).s_id);
             for (var i=0; i<res.rows.length; i++) {

                $scope.allSessions.push({
                    id: res.rows.item(i).id,
                    s_id: res.rows.item(i).s_id,
                    name: res.rows.item(i).name,
                    amount: res.rows.item(i).amount,
                    total_sessions: res.rows.item(i).total_sessions,
                    commission: res.rows.item(i).commission,
                    total_order: res.rows.item(i).total_order,
                    created_date: res.rows.item(i).created_date,
                    last_edit: res.rows.item(i).last_edit
                    });

             }
        } else {
            console.log("No results found");
        }
    }, function (err) {
        console.error("error=>"+err);
    });
}

HTML
<ion-list>
  <ion-item ng-repeat="session in allSessions | filter: searchKey" href="#/app/session/{{session.id}}">
    <h3>{{session.id}} {{session.name}}</h3>
    <p>{{session.amount}}</p>
  </ion-item>
</ion-list>

