angular-datatables icon indicating copy to clipboard operation
angular-datatables copied to clipboard

dtInstance.changeData(ajaxCommon) not call ajax common function

Open orbitboy007 opened this issue 9 years ago • 1 comments

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);
         })
}

orbitboy007 avatar Apr 07 '17 14:04 orbitboy007

I don't get why getting data needs a POST... Well that's another story.

You can use promises instead. See this example.

l-lin avatar Apr 09 '17 15:04 l-lin