angular-datatables
angular-datatables copied to clipboard
dtInstance.changeData(ajaxCommon) not call ajax common function
I tried to changed data using following code but it's disable all dtOptions
$scope.reloadData = function() {
vm.dtInstance.changeData({method:"POST",url:url,data:dataSrc});
};
so i go for following way which is also not working,
$scope.reloadData = function() {
vm.dtInstance.changeData(ajaxCommon);
};
var ajaxCommon = function(data, callback, settings) {
$http({
method: 'POST',
url: url,
data: source
}).success( function (response) {
callback(response);
})
}
I don't get why getting data needs a POST... Well that's another story.
You can use promises instead. See this example.