How to apply filters to *ngFor?

前端 未结 23 1230
無奈伤痛
無奈伤痛 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:08

    I've created a plunker based off of the answers here and elsewhere.

    Additionally I had to add an @Input, @ViewChild, and ElementRef of the and create and subscribe() to an observable of it.

    Angular2 Search Filter: PLUNKR (UPDATE: plunker no longer works)

提交回复
热议问题