Dependencies
The required dependencies are:
- AngularJS (tested with version 1.2.6)
- JQuery (tested with version 1.11.0)
- Datatables (tested with version 1.9.4 and 1.10+)
This module has been tested with the following datatables modules:
- ColReorder with version 1.1.0
- ColVis with version 1.1.0
- TableTools with version 2.2.0
Download
Manually
The files can be downloaded on GitHub.
With Bower
Installation
Include the JS file in your index.html
file:
<script src="angular-datatables.min.js"></script>
You must include the JS file AFTER jQuery
and DataTables
!
Declare dependencies on your module app like this:
Additional Notes
- This module does not support multiple datatables in the same page (YET)! You can do it, but expect some side effects!
-
Each time a datatable is rendered, a message is sent to the parent scopes with the id of the table.
For instance, for the given dataTable:You can catch the event like this in your parent directive or controller:
$scope.$on('event:dataTableLoaded', function(event, loadedDT) { // loadedDT === {"id": "foobar"} });