With options

The angular-datatables provides the helper DTOptionsBuilder that lets you build the datatables options.

It also provides the helper DTColumnBuilder that lets you build the column and column defs options.

See the API for the complete list of methods of the helpers.

Note:

ID First name Last name
1 Foo Bar
123 Someone Youknow
987 Iamout Ofinspiration
ID First name Last name
1 Foo Bar
123 Someone Youknow
987 Iamout Ofinspiration
angular.module('showcase.withOptions', ['datatables']).controller('WithOptionsCtrl', WithOptionsCtrl); function WithOptionsCtrl(DTOptionsBuilder, DTColumnDefBuilder) { var vm = this; vm.dtOptions = DTOptionsBuilder.newOptions() .withPaginationType('full_numbers') .withDisplayLength(2) .withDOM('pitrfl'); vm.dtColumnDefs = [ DTColumnDefBuilder.newColumnDef(0), DTColumnDefBuilder.newColumnDef(1).notVisible(), DTColumnDefBuilder.newColumnDef(2).notSortable() ]; }