W3cubDocs

/Angular 7

TrackByFunction

interface

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

Parameters
index number
item T
Returns

any

© 2010–2019 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v7.angular.io/api/core/TrackByFunction