The Angular way with options

You can also provide datatable options and datatable column options with the directive dt-options:

Note:

ID FirstName LastName
{{ person.id }} {{ person.firstName }} {{ person.lastName }}
ID FirstName LastName
{{ person.id }} {{ person.firstName }} {{ person.lastName }}
angular.module('datatablesSampleApp', ['ngResource', 'datatables']) .controller('angularWayWithOptionsCtrl', function ($scope, $resource, DTOptionsBuilder, DTColumnDefBuilder) { $scope.persons = $resource('data.json').query(); $scope.dtOptions = DTOptionsBuilder.newOptions().withPaginationType('full_numbers').withDisplayLength(2); $scope.dtColumnDefs = [ DTColumnDefBuilder.newColumnDef(0), DTColumnDefBuilder.newColumnDef(1).notVisible(), DTColumnDefBuilder.newColumnDef(2).notSortable() ]; });