这是我发布数据的代码
$scope.res=function(fina){
$scope.total= $scope.output;
$scope.finals=angular.copy($scope.fina);
$http.post('/submit', {order: $scope.finals,total: $scope.total}).success(function(data){
alert(data);
$scope.finals=data;
});
};
//load_groups();
$http.get('http://localhost:3070/submit').success(function(data){
alert("here too");
$scope.finals=data;
});
我可以在同一篇文章中发布订单和总计吗?如果是,我怎么能在get ??
中访问它这是我的app.get代码。如何在此发送总数?
app.get('/submit', function (req, res){
//TODO check that the data is valid before just using it
return res.json( req.session.order);
});