Stable Class
Class Overview
class KeyValueDiffers { staticcreate(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers) : KeyValueDiffers staticextend(factories: KeyValueDifferFactory[]) : Provider constructor(factories: KeyValueDifferFactory[]) factories : KeyValueDifferFactory[] find(kv: Object) : KeyValueDifferFactory }
Class Description
A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
Constructor
constructor(factories: KeyValueDifferFactory[])
Static Members
create(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers) : KeyValueDiffers
extend(factories: KeyValueDifferFactory[]) : Provider
Takes an array of KeyValueDifferFactory
and returns a provider used to extend the inherited KeyValueDiffers
instance with the provided factories and return a new KeyValueDiffers
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 KeyValueDiffer
available.
@Component({ viewProviders: [ KeyValueDiffers.extend([new ImmutableMapDiffer()]) ] })
Class Details
factories : KeyValueDifferFactory[]
find(kv: Object) : KeyValueDifferFactory
exported from @angular/core/index, defined in @angular/core/src/change_detection/differs/keyvalue_differs.ts
Please login to continue.