I’m using Struts1.2 with Angular to post some data and want to get the data in java.
I’m able to retrieve the data from the server and able to display it in the scre
It is not data that you should use params
instead of data tag.
$scope.postData = function() {
var data = escape(angular.toJson($scope.items));
$http({
method: 'POST',
url: '/StrutsWithAngular/shopingCart.do',
params: 'cartValues='+data,
headers: {'Content-Type': 'application/x-www-form-urlencoded'}
}).success(function(data, status, headers, config) {
$scope.items = data;
}).error(function(data, status, headers, config) {
// alert("Error :: "+data);
});
};