The first way, the parameters are placed in the POST request
Createtask:function (filename,begindate,enddate) {
var url = ' Financialexporttoebs/createtask ';
var deferred = $q. Defer ();
var promise = $http. Post (url,{"filename": filename, "begindate": Begindate, "EndDate": EndDate}). Then (function ( Response) {
return response;
},function (response) {
return response;
});
return promise;
}
In this way, the name of the parameter in the background accept method is the same as the name of the map in the Post method to receive
The second method is placed in the requested URL
Getpagelist:function (pageindex,pagesize) {
var url = ' financialexporttoebs/pagelist/' +pageindex+ '/' +pagesize;
var deferred = $q. Defer ();
var promise = $http. Post (URL). Then (function (response) {
return response;
},function (response) {
return response;
});
return promise;
}
So the background of the URL to have a corresponding value such as @RequestMapping (value = "/pagelist/{pageindex}/{pagesize}")
ANGULARJS Access background Pass-through method