在这样的函数中是否可以从$ http.post PHP mysql访问json数据:
$scope.getallNamesList = function() {
$http.post("database/selectall_names.php",{user_id: $scope.selectedUserID})
.then(function(response){
$scope.names = response.data;
if(response.data.user_city == "xxx")
{
$scope.selectedCity = response.data.user_city;
}
});
}