I am using track by function in my ionic angular app and while building the app, it gives me error: Type '(index: any, item: any) => any' is missing the following properties from type 'any[]': pop, push, concat, join, and 25 more.
I am using this function as:
html:
<div *ngFor="let group of groups; index as i; trackBy: trackByFn | groupFilter: searchGroup">
component:
trackByFn(index, item) {
return item.key;
}
any idea what am i doing wrong? Thanks for help.
you are using filter in wrong place. the correct variant would be