l-lin / angular-datatables

DataTables with Angular
https://l-lin.github.io/angular-datatables/
MIT License
1.57k stars 487 forks source link

Table loaded twice when using Ajax #1440

Closed leyj322 closed 3 years ago

leyj322 commented 4 years ago

I playing the datatable with server side and i have no idea why the table loaded twice.


[ ] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[x] Question



    $scope.dtOptions = DTOptionsBuilder.newOptions()
                                    .withOption('ajax',  function (data, callback, settings) {
                                            $scope.dtOptions.aoColumns = [];
                                            $scope.dtOptions.aoColumns.push(
                                                  {'mData' : data.students, 'sTitle': 'Date'}
                                            ),
                                    .withOption('serverSide', true)
                                    .withOption('aoColumns', [
                                        {'mData' : 'Class', 'sTitle': 'FooTitle'},
                                    ])
                                }

Environment


- node version:
- angular version: 1.6
- angular-cli version:
- jquery version:
- datatables version: 
- angular-datatables version:0.Y.Z