根据返回的数据列表过滤“ ngFor”循环

时间:2019-05-03 09:24:55

标签: filter angular6

以下是角度1.5的代码

<tr ng-if="getdetailAttrList.length >= 0" 
ng-repeat="info in eventDetailInfoList 
| unique:'detailAttrName' | filter: { detailAttrName: '!UID' } 
| filter: { detailAttrName: '!PROVIDERID' }">
   <td class="subj">{{info.getName}}</td>
   <td>{{info.getString}}</td>
</tr>

我必须做滤镜并且在角度6中是唯一的。如何实现这一点? 示例数据如下所示

getdetailAttrList= [
    { getName: "Id", getNumber: "1335626187264778", getString: '10000450439458'},
    { getName: "Pat_Id", getNumber: "1335626196206806", getString: '00350242060011'},
    { getName: "Prov_Id", getNumber: "1335626218309875", getString: '3228610'},
    { getName: "Pat_Name", getNumber: "1335626212804143", getString: '200131'},

];

0 个答案:

没有答案