How to apply filters to *ngFor?

前端 未结 23 1242
無奈伤痛
無奈伤痛 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 03:47

    A simple solution that works with Angular 6 for filtering a ngFor, it's the following:

    
      
    your code

    Spans are useful because does not inherently represent anything.

提交回复
热议问题