var table = $('#example').DataTable( {
ajax: "data.json"
} );
setInterval( function () {
table.ajax.reload();
}, 30000 );
$('#my-datatable').DataTable().ajax.reload();
// table.ajax.reload(callback, resetPaging)
table.ajax.reload(null, false)
dtInstance.ajax.reload( null, false ); // user paging is not reset on reload, second param is resetPaging
table.ajax.reload(null, false)
table.ajax.reload(null, false)
//vbjhjhvdfvjhf
//declare this var
dtElement: DataTableDirective;
//create method and call it where ever you want to refresh your table
reload(): void {
this.dtElement.dtInstance.then((dtInstance: DataTables.Api) => {
dtInstance.draw();
});
}