【发布时间】:2019-08-09 21:30:20
【问题描述】:
我在我的应用程序中使用 jhipster。我有一个添加了分页和排序的表,但我还想在列中添加一个搜索字段,这可能吗?会是这样的http://ng-table.com/
我的 HTML 是:
<div class="table-responsive" *ngIf="entities">
<table class="table table-striped">
<thead>
<tr jhiSort [(predicate)]="predicate" [(ascending)]="reverse" [callback]="transition.bind(this)">
<th jhiSortBy="id"><span jhiTranslate="global.field.id">ID</span> <span class="fa fa-sort"></span></th>
<th jhiSortBy="nombre"><span jhiTranslate="app.entity.name">Name</span> <span class="fa fa-sort"></span></th>
</tr>
</thead>
<tbody>
<tr *ngFor="let entity of entities ;trackBy: trackId">
<td><a [routerLink]="['../entity', entity.id ]">{{entity.id}}</a></td>
<td>{{entity.name}}</td>
</tr>
</tbody>
</table>
</div>
谢谢。
【问题讨论】: