function PostsCtrlAjax($scope, $http)
{
function queryData(){
$http({method: 'POST', url: 'ajax.php'}).
success(function(data)
{
$scope.orders = data;
$scope.loading = true;
}).
error(function(data, status, headers, config) {
console.log(status);
});
}
queryData();
setInterval(queryData, 1000);
}