Reputation: 11
I need to load data from the server on page change event of datatables.I am using angular-datatables.min.js
. but can not seem to latch on to the page.dt event of the datables through angular scope
. Please help me on this.
Upvotes: 1
Views: 3093
Reputation: 1184
Not sure if you got it working- but this is what I just had to do. Might not be the most elegant but I am able to catch the colum-sizing.dt event:
$scope.$on('event:dataTableLoaded', function (event, loadedDT) {
// loadedDT.DataTable is the DataTable API instance
// loadedDT.dataTable is the jQuery Object
loadedDT.DataTable.on('column-sizing.dt', function(e, settings) {
console.log('WOOOHOOOO');
});
});
I catch the angular-datatables event that gets fired when a data table is loaded and then I bind the data tables events on it there.
Upvotes: 2