Angular 在ngx数据表中添加其他列

Angular 在ngx数据表中添加其他列,angular,ngx-datatable,Angular,Ngx Datatable,我正在使用Angular 6并在应用程序中添加数据表 在模板文件中,我使用以下代码显示datatable <ngx-datatable [columns]="columns" [columnMode]="'force'" [headerHeight]="40" [footerHeight]="50" [rowHeight]="'auto'" [limit]="10" [rows]='rows'> <ngx-datatable-column na

我正在使用
Angular 6
并在应用程序中添加数据表

在模板文件中,我使用以下代码显示datatable

<ngx-datatable
  [columns]="columns"
  [columnMode]="'force'"
  [headerHeight]="40"
  [footerHeight]="50"
  [rowHeight]="'auto'"
  [limit]="10"
  [rows]='rows'>

  <ngx-datatable-column name="Actions" prop="action">
    <ng-template ngx-datatable-cell-template let-rowIndex="rowIndex" let-value="value" let-row="row">
      <button type="button" class="btn btn-outline-success">Success</button>
    </ng-template>
  </ngx-datatable-column>

</ngx-datatable>
但这只显示了一列

删除
工作正常,但没有操作列


如何在数据表中添加
操作
列或其他列?

如果指定一个
ngx数据表列
,则必须全部指定。这就是为什么在没有显式列的情况下,一切都可以正常工作的原因

如果显式添加其他列,它应该可以正常工作-无需添加模板:

<ngx-datatable-column name="Property 2" prop="prop2"></ngx-datatable-column>


。。。等等。

如果指定一个
ngx数据表列
,则必须全部指定。这就是为什么在没有显式列的情况下,一切都可以正常工作的原因

如果显式添加其他列,它应该可以正常工作-无需添加模板:

<ngx-datatable-column name="Property 2" prop="prop2"></ngx-datatable-column>

。。。等等