Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/angular/29.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Angular 按列搜索字段的Jhipster表_Angular_Jhipster - Fatal编程技术网

Angular 按列搜索字段的Jhipster表

Angular 按列搜索字段的Jhipster表,angular,jhipster,Angular,Jhipster,我在应用程序中使用jhipster。我有一个表,我已经添加了分页和排序,但我也想在列中添加一个搜索字段,这是可能的吗?应该是这样的 我的HTML是: <div class="table-responsive" *ngIf="entities"> <table class="table table-striped"> <thead> <tr jhiSort [(predicate)]="predicate" [(a

我在应用程序中使用jhipster。我有一个表,我已经添加了分页和排序,但我也想在列中添加一个搜索字段,这是可能的吗?应该是这样的

我的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>

身份证件
名称
{{entity.id}
{{entity.name}

谢谢。

我通过输入和angular的“purefilter”属性成功地实现了这一点。它是这样的:

<input type="text" [(ngModel)]="filter" class="form-control">

<table> 
......
    <tr *ngFor="let entity of (entities | pureFilter:filter:'name')>
.......

......