usage of ngFor with ng template in ngx-datatable-column

Issue

I am having a problem here where my ngFor does not show any data, although there is no stack error or something.

I want to know how to display my array of objects -called “cldbAccounts”- which has to objects and display two properties of them in that same column.

my code for that part

<ngx-datatable-column *ngIf="mode === 'contract' || mode === 'factorer'" name="CldbAccount" prob="cldbAccount">
   <ng-template let-column="column" height="200" let-onSort="sortFn" ngx-datatable-header-template>
      <span class="datatable-header-cell-wrapper">
      <span class="datatable-header-cell-label draggable" (click)="onSort()">CldbAccount</span>
      </span>
   </ng-template>
   <ng-template ngFor let-cldbAccount [ngForOf]="cldbAccounts">
      {{ cldbAccount.cldbAccount.cldbAccount }} [{{ cldbAccount.debitor.name }}]
   </ng-template>
</ngx-datatable-column>

I tried also that solutions from this answer see here but the same problem exists

Solution

i found the problem was just a typo in my code wher prob="cldbAccount" should be prop="cldbAccount"

Answered By – Hesham A. Othman

Answer Checked By – Robin (AngularFixing Admin)

Leave a Reply

Your email address will not be published.