IterableChanges is the result of comparing an iterable with an Angular IterableDiffer. It contains detected changes, or the diff returns null when none are found, allowing a directive to skip unnecessary work. section 15.3.4
Table 15.4. The IterableChanges methods and properties
|
Name
|
Description
|
|
forEachItem(func)
|
This method invokes the specified function for each object in the collection.
|
|
forEachPreviousItem(func)
|
This method invokes the specified function for each object in the previous version of the collection.
|
|
forEachAddedItem(func)
|
This method invokes the specified function for each new object in the collection.
|
|
forEachMovedItem(func)
|
This method invokes the specified function for each object whose position has changed.
|
|
forEachRemovedItem(func)
|
This method invokes the specified function for each object that was removed from the collection.
|
|
forEachIdentityChange(func)
|
This method invokes the specified function for each object whose identity has changed.
|
Review the callbacks for processing items, additions, removals, moves, and identity changes. section 15.3.4
Callbacks receive an IterableChangeRecord describing an item, its current and previous indices, and—when trackBy is used—its identity value. A structural directive can use added-item records to create views for new product rows. section 15.3.4
