Getting started

Dependencies

The required dependencies are:

This module has been tested with the following datatables modules:


Download

Manually

The files can be downloaded on  GitHub.

With Bower

$ bower install angular-datatables

Installation

Include the CSS, JS file in your index.html file:

 You must include the JS file in this order. AngularJS MUST use jQuery and not its jqLite!

Declare dependencies on your module app like this:

angular.module('myModule', ['datatables']);

Additional Notes

  • RequireJS is not supported.
  • Angular DataTables is using Object.create() to instanciate options and columns.

    If you need to support IE8, then you need to add this Polyfill.

  • When providing the DT options, Angular DataTables will resolve every promises (except the attributes data, aaData and fnPromise) before rendering the DataTable.

    For example, suppose we provide the following code:

    angular.module('yourModule') .controller('MyCtrl', MyCtrl); function MyCtrl($q, DTOptionsBuilder) { var vm = this; vm.dtOptions = DTOptionBuilder.newOptions() .withOptions('autoWidth', fnThatReturnsAPromise); function fnThatReturnsAPromise() { var defer = $q.defer(); defer.resolve(false); return defer.promise; } }

    The fnThatReturnsAPromise will first be resolved and then the DataTable will be rendered with the option autoWidth set to false.