# With the DataTables Scroller

The `angular-datatables` also provides an API in order to make the plugin `Scroller` works with datatables.

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

<tabset>

angular.module('datatablesSampleApp', ['datatables']).controller('WithScrollerCtrl', WithScrollerCtrl); function WithScrollerCtrl(DTOptionsBuilder, DTColumnBuilder) { var vm = this; vm.dtOptions = DTOptionsBuilder.fromSource('data.json') .withScroller() .withOption('deferRender', true) // Do not forget to add the scorllY option!!! .withOption('scrollY', 200); vm.dtColumns = [ DTColumnBuilder.newColumn('id').withTitle('ID'), DTColumnBuilder.newColumn('firstName').withTitle('First name'), DTColumnBuilder.newColumn('lastName').withTitle('Last name') ]; }
</tabset>