• Overview
@angular/core

IterableDiffers

Class

A repository of different iterable diffing strategies used by NgFor, NgClass, and others.

  
    class IterableDiffers {}
  
  
@paramiterableany
@paramfactoriesIterableDifferFactory[]
@paramparentIterableDiffers | undefined

Takes an array of IterableDifferFactory and returns a provider used to extend the inherited IterableDiffers instance with the provided factories and return a new IterableDiffers instance.

@paramfactoriesIterableDifferFactory[]
Usage notes

Example

The following example shows how to extend an existing list of factories, which will only be applied to the injector for this component and its children. This step is all that's required to make a new {@link IterableDiffer} available.

          
@Component({  viewProviders: [    IterableDiffers.extend([new ImmutableListDiffer()])  ]})
Jump to details