I am using bootstrap server side datatable in my angularjs application and now i want to reload the data of that datatable after every minute. So how can i do it? I am using the following code:
HTML:
<table bs-table-control="matterTableControl" id="matterTableControl"></table>
Controller:
$scope.getMatterTable = (function () {
$scope.matterTableControl = {
options : {
toolbar : "#get",
url : url,
dataField : 'rows',
cache : false,
sidePagination : 'server',
pagination : false,
showExport : false,
queryParams : queryParams,
clickToSelect : true,
onClickRow : onClickRow,
maintainSelected : true,
columns : [{
field : 'ClientName',
title : 'Client',
align : 'left',
valign : 'bottom',
sortable : false
}, {
field : 'Name',
title : 'Matter',
align : 'left',
valign : 'bottom',
sortable : false
}
]
}
}
});
I am trying to reload this by using following code but getting no success:
$interval(function () {
$scope.getMatterTable();
}.bind(this), 60000);
Documentation of Datatable: http://bootstrap-table.wenzhixin.net.cn/documentation/
Example: http://issues.wenzhixin.net.cn/bootstrap-table/#integrate/angular
Github Code of datatable: https://github.com/wenzhixin/bootstrap-table-examples/tree/master/integrate/angular