如何将按钮添加到 Angular 8 中的 ngx-datatable 中的列?
How can i add button to a column in a ngx-datatable in Angular 8?
这个 HTML 代码对我不起作用。
<ngx-datatable-column name="Option" prop="option" [draggable]="false" [resizeable]="false
[width]="250">
<span>
<button class="optionButton" type="button" data-toggle="modal" data-
target="#addOption">Reserve Product</button>
</span>
</ngx-datatable-column>
将按钮保持在 <ng-template>
内
这样试试:
<ngx-datatable-column name="Option" prop="option" [draggable]="false" [resizeable]="false
[width]="250">
<ng-template ngx-datatable-cell-template let-value="value">
<span>
<button class="optionButton" type="button" data-toggle="modal" data-
target="#addOption">Reserve Product</button>
</span>
</ng-template>
</ngx-datatable-column>
这个 HTML 代码对我不起作用。
<ngx-datatable-column name="Option" prop="option" [draggable]="false" [resizeable]="false
[width]="250">
<span>
<button class="optionButton" type="button" data-toggle="modal" data-
target="#addOption">Reserve Product</button>
</span>
</ngx-datatable-column>
将按钮保持在 <ng-template>
这样试试:
<ngx-datatable-column name="Option" prop="option" [draggable]="false" [resizeable]="false
[width]="250">
<ng-template ngx-datatable-cell-template let-value="value">
<span>
<button class="optionButton" type="button" data-toggle="modal" data-
target="#addOption">Reserve Product</button>
</span>
</ng-template>
</ngx-datatable-column>