How to apply filters to *ngFor?

前端 未结 23 1585
無奈伤痛
無奈伤痛 2020-11-22 03:44

Apparently, Angular 2 will use pipes instead of filters as in Angular1 in conjunction with ng-for to filter results, although the implementation still seems to be vague, wit

23条回答
  •  野性不改
    2020-11-22 04:09

    You could also use the following:

    
    

    This will only show the div if your items matches the condition

    See the angular documentation for more information If you would also need the index, use the following:

    
    

提交回复
热议问题