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: number, item: T): any
    
参数
index number
item T
返回值

any