IterableDiffer

A strategy for tracking changes over time to an iterable. Used by NgForOfto respond to changes in an iterable by effecting equivalent changes in the DOM.

      
      interface IterableDiffer<V> {
  diff(object: NgIterable<V>): IterableChanges<V> | null
}
    

方法

Compute a difference between the previous state and the new object state.

diff(object: NgIterable<V>): IterableChanges<V> | null
      
      diff(object: NgIterable<V>): IterableChanges<V> | null
    
参数
object NgIterable

containing the new value.

返回值

IterableChanges<V> | null: an object describing the difference. The return value is only valid until the next diff() invocation.