我想向angularjs文件发送Select查询响应。
Php file
header('Content-Type: application/json');
echo json_encode(pg_fetch_row($res));
angularjs file
$http({
method: 'GET',
url: 'getData.php'
}).then(function successCallback(response) {
console.log(response);
$scope.products= response.data;
}, function errorCallback(response) {
console.log(response);
});
响应是Object {data: "↵ ", status: 200, config: Object, statusText: "OK", headers: function}
我怎样才能得到'数据'。这个符号“↵”是什么?