How do make HTML page load after AngularJS gets response from database?

Viewed 2223

I have a table on an HTML page where the data is stored in a database. I want the table or the whole page to be loaded only after the data is received. Can I do this?

AngularJS Code:

angular.module("app", []).controller("controller", function($scope, $http) {         
$http({
    method: 'POST',
    url: 'updateCoins.php',
    data: {get: 1},
}).then(function(response){
 $scope.db = response.data;
});
});

The table gets filled like this:

<tr>
    <td>{{db[0]['percent']}}%</td>
 </tr>
2 Answers
Related