This is the archived documentation for Angular v6. Please visit angular.io to see documentation for the current version of Angular.

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 | null, currentIndex: number | null) => 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 | null, currentIndex: number | null) => 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

Type: 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

Type: (record: IterableChangeRecord_) => void.

forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void)
      
      forEachOperation(fn: (item: IterableChangeRecord<V>, previousIndex: number | null, currentIndex: number | null) => void)
    

Parameters

fn

Type: (item: IterableChangeRecord, previousIndex: number | null, currentIndex: number | null) => void.

forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void)
      
      forEachPreviousItem(fn: (record: IterableChangeRecord_<V>) => void)
    

Parameters

fn

Type: (record: IterableChangeRecord_) => void.

forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void)
      
      forEachAddedItem(fn: (record: IterableChangeRecord_<V>) => void)
    

Parameters

fn

Type: (record: IterableChangeRecord_) => void.

forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void)
      
      forEachMovedItem(fn: (record: IterableChangeRecord_<V>) => void)
    

Parameters

fn

Type: (record: IterableChangeRecord_) => void.

forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void)
      
      forEachRemovedItem(fn: (record: IterableChangeRecord_<V>) => void)
    

Parameters

fn

Type: (record: IterableChangeRecord_) => void.

forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void)
      
      forEachIdentityChange(fn: (record: IterableChangeRecord_<V>) => void)
    

Parameters

fn

Type: (record: IterableChangeRecord_) => void.

      
      diff(collection: NgIterable<V>): DefaultIterableDiffer<V> | null
    

Parameters

collection

Type: NgIterable.

Returns

DefaultIterableDiffer<V> | null

onDestroy()
      
      onDestroy()
    

Parameters

There are no parameters.

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

Parameters

collection

Type: NgIterable.

Returns

boolean