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

DefaultIterableDiffer

Deprecated: v4.0.0 - Should not be part of public API.

class DefaultIterableDiffer<V> implements IterableDiffer, IterableChanges { constructor(trackByFn?: TrackByFunction<V>) length: number collection: V[] | Iterable<V> | null isDirty: boolean forEachItem(fn: (record: IterableChangeRecord_<V>) => void) forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number, currentIndex: number) => void) forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void) forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void) forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void) forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void) forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void) diff(collection: NgIterable<V>): DefaultIterableDiffer<V> | null onDestroy() check(collection: NgIterable<V>): boolean }
      
      class DefaultIterableDiffer<V> implements IterableDiffer, IterableChanges {
  constructor(trackByFn?: TrackByFunction<V>)
  length: number
  collection: V[] | Iterable<V> | null
  isDirty: boolean
  forEachItem(fn: (record: IterableChangeRecord_<V>) => void)
  forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number, currentIndex: number) => void)
  forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void)
  forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void)
  forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void)
  forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void)
  forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void)
  diff(collection: NgIterable<V>): DefaultIterableDiffer<V> | null
  onDestroy()
  check(collection: NgIterable<V>): boolean
}
    

Constructor

constructor(trackByFn?: TrackByFunction<V>)
      
      constructor(trackByFn?: TrackByFunction<V>)
    
Parameters
trackByFn TrackByFunction

Optional. Default is undefined.

Properties

Property Description
length: number Read-only.
collection: V[] | Iterable<V> | null Read-only.
isDirty: boolean Read-only.

Methods

forEachItem(fn: (record: IterableChangeRecord_<V>) => void)
      
      forEachItem(fn: (record: IterableChangeRecord_<V>) => void)
    
Parameters
fn (record: IterableChangeRecord_) => void
forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number, currentIndex: number) => void)
      
      forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number, currentIndex: number) => void)
    
Parameters
fn (item: IterableChangeRecord, previousIndex: number, currentIndex: number) => void
forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void)
      
      forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void)
    
Parameters
fn (record: IterableChangeRecord_) => void
forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void)
      
      forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void)
    
Parameters
fn (record: IterableChangeRecord_) => void
forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void)
      
      forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void)
    
Parameters
fn (record: IterableChangeRecord_) => void
forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void)
      
      forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void)
    
Parameters
fn (record: IterableChangeRecord_) => void
forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void)
      
      forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void)
    
Parameters
fn (record: IterableChangeRecord_) => void
onDestroy()
      
      onDestroy()
    
Parameters

There are no parameters.

check(collection: NgIterable<V>): boolean
      
      check(collection: NgIterable<V>): boolean
    
Parameters
collection NgIterable
Returns

boolean