class
A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
class KeyValueDiffers { static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers static extend<S>(factories: KeyValueDifferFactory[]): StaticProvider constructor(factories: KeyValueDifferFactory[]) factories: KeyValueDifferFactory[] find(kv: any): KeyValueDifferFactory }
'root'
create() | ||||||
---|---|---|---|---|---|---|
|
factories | KeyValueDifferFactory[] | |
parent | KeyValueDiffers | Optional. Default is |
extend() | |||
---|---|---|---|
Takes an array of | |||
|
factories | KeyValueDifferFactory[] |
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()]) ] })
Property | Description |
---|---|
factories: KeyValueDifferFactory[] |
find() |
---|
© 2010–2021 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v11.angular.io/api/core/KeyValueDiffers