I am currently implementing $http for querying data with angular datatable. How could $resource be implemented instead?
function serverData(sSource, aoData, fnCallback, oSettings) {
var request = {
method: 'POST',
url: '/datatable/post/'
}
$http(request).then((data) => {
fnCallback(data.data);
});
}
$scope.dtOptions = DTOptionsBuilder.newOptions()
.withDataProp('data')
.withOption('processing', true)
.withOption('serverSide', true)
.withFnServerData(serverData);