从AngularJS $ http请求中提取数据

I sending a request to my php file to get data from database from my AngularJS file. Some-time I am getting data also lot of time there is no response is coming. Here is my AngularJS code:

myApp.controller('PageCtrl', function PageCtrl($scope, $routeParams, $http) {
  $http.post(APP_URL + "server/FullDesc.php", {id: parseInt($routeParams.Id)}).success(function (data) {
    var timer = setTimeout(function () {
        $scope.Details = data[0];
        console.log(data);            
        $scope.$apply($scope.Details);
    }, 10);
  }, 'json');
})

In resposne I am getting output of my response like this

In image you can see there is no response showing. How to solve this issue.

You should try adding an error scenario as well:

myApp.controller('PageCtrl', function PageCtrl($scope, $routeParams, $http) {

    $http.post(APP_URL + "server/FullDesc.php", 
        {id: parseInt($routeParams.Id)}
    ).then(function(successResponse){

        var data = successResponse.data;
        console.log('successResponse', data);
        $scope.Details = data[0];

        //$scope.$apply($scope.Details); // assigning to scope should automatically do an apply

    }, function(errorResponse){

        console.log('errorResponse', errorResponse);

    });

});

Then you should also check what is being sent to the server and what the server sends back. It seems your server may be encountering an error and you are not sending an error response back.