Help Angular by taking a 1 minute survey!Go to surveyHome

TrackByFunction

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

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

Methods

(index: number, item: T): any
      
      (index: number, item: T): any
    
Parameters
index number
item T
Returns

any