保存新数据时出错。我正在使用AngularJS
无法加载资源:服务器响应状态为400(错误请求)
app.js
Call23.factory('data', function ($resource) {
return $resource('/api/Person1/:id', { id: '@id' }, { update: { method:'PUT' } });
});
var ListCtrl = function ($scope, $location, data, $http) {
$scope.users = [];
$scope.search = function () {
data.query({
offset: $scope.offset,
limit: $scope.limit,
q: $scope.query,
p: $scope.part
},
function (something) {
$scope.users = $scope.users.concat(something);
});
};
};
var CreateCtrl = function ($scope, $location, data) {
$scope.save = function () {
data.save($scope.lis, function () {
$location.path('/')
});
};
请你帮我解决这个错误。