0

I am trying to get Datatables.net to work in my Angular 7 project. The table renders fine, but it does not show sorting on columns, paging buttons etc, here is an image of my table missing the above mentioned:

Table

Here is my project specifications:

  • Angular CLI version 7
  • Bootstrap-4.3.1

I followed this article, and although it referes to Angular 6, I am assuming process should be similiar.

Here is my scripts/styles within the angular.jsonfile.

Dependencies

I am setting the DataTable options as follow within my .ts class:

dtOptions: DataTables.Settings = {
    pagingType: 'full_numbers',
    pageLength: 20,
    paging: true
};

And then binding the above options to my table as follow:

<table datatable [hidden]="!hasData" [dtOptions]="dtOptions" [dtTrigger]="dtTrigger".

I do not have any console errors, so finding out what is wrong is quite difficult.

Am I missing something?

monstertjie_za
  • 7,277
  • 8
  • 42
  • 73

0 Answers0