IterableDiffers
Stable
Class
Class Overview
class IterableDiffers { static create(factories: IterableDifferFactory[], parent?: IterableDiffers) : IterableDiffers static extend(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
© 2010–2017 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v2.angular.io/docs/ts/latest/api/core/index/IterableDiffers-class.html