IterableDiffers

Stable Class

Class Overview

class IterableDiffers {
  staticcreate(factories: IterableDifferFactory[], parent?: IterableDiffers) : IterableDiffers
  staticextend(factories: IterableDifferFactory[]) : Provider
  constructor(factories: IterableDifferFactory[])
  
  
  factories : IterableDifferFactory[]
  find(iterable: any) : IterableDifferFactory
}

Class Description

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

Constructor

constructor(factories: IterableDifferFactory[])

Static Members

create(factories: IterableDifferFactory[], parent?: IterableDiffers) : IterableDiffers
extend(factories: IterableDifferFactory[]) : Provider

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.

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 IterableDiffer available.

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

Class Details

factories : IterableDifferFactory[]
find(iterable: any) : IterableDifferFactory

exported from @angular/core/index, defined in @angular/core/src/change_detection/differs/iterable_differs.ts

doc_Angular
2016-10-06 09:46:38
Comments
Leave a Comment

Please login to continue.