I want to send as a part of a Pageable object the direction/order of a query "ASC" or "DESC". So my problem is that even if I set the direction as value of pageable and the API URL Request has this information in it, the Spring backend does not correctly parse the Pageble object and it always shows ASC as direction (I think this may be the default state).
This is my filter method in Angular controller
Controller.prototype.sortByDate = function(asc_desc, isStartDate){
this.pageable.sort = isStartDate ? "validityStartDate" : "validityEndDate";
this.pageable.direction = asc_desc;
this.service.findAll(this.filter, this.pageable).then(function(data){
this.magazineCollectionSubscriptionList = data.content;
this.setupPagination( data.totalElements );
this.changePageSize(size, this.filter);
}.bind(this));
}
This is my API call in the Service of this entity
Service.prototype.findAll = function(filter, pageable){
return this.httpService.post(this.serviceUrl + '/list',filter, { params: pageable });
};
This is the request it creates
And here is what the debug show on IDE