0

I am using ngx-datatable on every page in my single page application. When I visit the first page and call the server backend it returns the data but does not show it in my html. I use the same data in my select angular material element and after I open it, the data in my ngx-datatable is also displayed. If I refresh the page the data is also displayed in my ngx-datatable. I want my data to be displayed without the need to refresh the page or using my select angular material element to display it. This problem only happens on my first page, all of the other pages normally display the data.

Component.ts

this.customerService.readall(null, data => {
            this.rows = data;
            this.dataService.fillCustomerList(data);
        });

Html

<ngx-datatable class="material" [rows]="rows" [columns]="columns" [columnMode]="'force'" [headerHeight]="50" [footerHeight]="50"
[rowHeight]="50" [limit]="8"  [cssClasses]="iconsCss">
<ngx-datatable-column name="Company name">
  <ng-template let-row="row" ngx-datatable-cell-template>
    <a [routerLink]="['/subscription', row.id , 'license-subscription', 'List']">{{row.companyProfile.companyName}} </a>
  </ng-template>
</ngx-datatable-column>

Andrej
  • 29
  • 5

0 Answers0