我试图解决这个错误,但是因为我刚接触到angularjs而陷入困境并需要帮助解决这个问题:
$scope.companyModify = function(company) {
var param = {
companyName: $scope.companyName,
billColumn: $scope.billColumn,
billTitle: $scope.billTitle,
serviceTax = $scope.serviceTax,
wishMessage = $scope.wishMessage,
billTypeId = $scope.billTypeId
};
SocketService.post(apiManage.apiList['CompanyModify'].api, param).then(function(resp) {
var data = resp.data.response;
if (data.status === true) {
angular.forEach($scope.companyList, function(value) {
if (value.billTypeId == billTypeId) {
value.$edit = false;
}
});
Notify.alert(data.message, {
status: 'success',
pos: 'top-right',
timeout: 5000
});
$scope.load();
} else {
Notify.alert(data.message, {
status: 'danger',
pos: 'top-right',
timeout: 5000
});
}
});
};
{{1}}
答案 0 :(得分:0)
我认为你的对象' param'错误地构建了。
你可以试试 -var param = {
companyName: $scope.companyName,
billColumn: $scope.billColumn,
billTitle: $scope.billTitle,
serviceTax: $scope.serviceTax,
wishMessage: $scope.wishMessage,
billTypeId: $scope.billTypeId
};
有' ='标志应由':'
替换其次,在调用方法之前,请确保所有变量,companyName,billColumn等都附加到模型,即$ scope - $ scope.companyModify()
如果有帮助,请告诉我。