I've been trying to sort data from strongloop using a call from angular controller.
angular.module('fsbs')
.controller('LocationCtrl', ['$scope', '$state', '$window', 'Location',
function ($scope, $state, $window, Location) {
$scope.dataset = [];
function get() {
Location
.find({
order: "name ASC"
})
.$promise
.then(function (data) {
$scope.dataset = data;
})
}
get();
}])
The request sent using the lb-service is:
http://localhost:3001/api/locations?order=name+ASC
The request sent using the explorer is:
http://0.0.0.0:3001/api/locations?filter=%7B%22order%22%3A%22name%20asc%22%7D
Even though I'm getting the data, it's not sorted. My question is, Why is lb-service generating such a request? Is there anything wrong in my controller?