Installation

To use angular-datatables, you need to have Node {{ nodeVersion }} or higher and NPM {{ npmVersion }} or higher installed.

The documentation will only deal with projects that use angular-cli. Indeed, the front-end ecosystem is evolving at a pace I can't follow anymore. Thus, there will only have a tutorial for angular-cli's project. If you managed to make it work in, for example, SystemJS projects, please submit a pull request to improve this documentation. Thanks!

Angular-CLI version {{ angularCliVersion }}

I recommend using angular-cli to create and manage your angular project

I prefer to warn you the demo was developpped in version {{ angularCliVersion }} and older and newer versions of Angular-CLI may need to have different configuration.

NPM

You need to install its dependencies before getting the latest release using NPM:

Setup

.angular-cli.json

Add the dependencies in the scripts and styles attributes:

NgModule

Import the DataTablesModule at the appropriate level of your app.

FAQ

Error encountered resolving symbol values statically

If you encounter the following error:

ERROR in Error encountered resolving symbol values statically. Function calls are not supported. Consider replacing the function or lambda with a reference to an exported function (position 194:50 in the original .ts file), resolving symbol NgModule in /home/l-lin/projects/angular-datatables/demo/node_modules/angular-datatables/node_modules/@angular/core/core.d.ts, resolving symbol DataTablesModule in /home/l-lin/projects/angular-datatables/demo/node_modules/angular-datatables/src/angular-datatables.module.ts, resolving symbol DataTablesModule in /home/l-lin/projects/angular-datatables/demo/node_modules/angular-datatables/src/angular-datatables.module.ts

Please update your tsconfig.json and add the following blocks:

More information HERE.