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
This is what I implemented without using pipe.
component.ts @Component({ .... }) export class YourComponent { filter(itemList: yourItemType[]): yourItemType[] { let result: yourItemType[] = []; //your filter logic here ... ... return result; } } 0 讨论(0) 查看其它23个回答 发布评论: 提交评论 加载中... 验证码 看不清? 提交回复
@Component({ .... }) export class YourComponent { filter(itemList: yourItemType[]): yourItemType[] { let result: yourItemType[] = []; //your filter logic here ... ... return result; } }