TrackByFunction

An optional function passed into NgForOfthat defines how to track items in an iterable (e.g. fby index or id)

interface TrackByFunction<T> { (index: number, item: T): any }

方法

(index: number, item: T): any

参数

index

Type: number.

item

Type: T.

返回值

any