Cleverstack Datatables module
This module provides a directive to create jQuery dataTables.
Setup
Setting up the jQuery Datatables and moment.js plugins
-
Add
datatables
andmoment
to your bower.json. -
run
bower install
-
Add datatables and moment to your app/modules/main.js file.
- Add the paths to the datatables and moment plugins to the paths object.
- A shim needs to be added to the shim object for datatables with a dependency on jquery.
- A shim needs to be added to the shim object for moment.
- Lastly, datatables and moment need to be added to the required array at the bottom.
- Add
moment
anddatatables
to your app/modules/application/main.js file. It belongs in the array of required modules.
Setting up Cleverstack Datatables
-
Add 'cs_datatables' to your app/modules/main.js file. It belongs in the
package
array at the top. -
Add
cs_datatables
to your app/modules/application/main.js file. It belongs in the array of required modules. -
Add
cs_datatables
to your app/modules/application/module.js file.cs_datatables
belongs in yourapp
module's array of required modules.
Usage
-
Add the
DataTableHelpers
angular module to your controller. -
Add the
dataTableOptions
attribute to the table you want to make a datatable and pass it a $scope variable that defines the datatable configuration for this table.