KeyValueDiffers
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
}
Static methods
create() | ||||||
---|---|---|---|---|---|---|
static create<S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffersParameters
Returns
|
extend() | |||
---|---|---|---|
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. | |||
static extend<S>(factories: KeyValueDifferFactory[]): StaticProviderParameters
Returns
| |||
Usage NotesExampleThe 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.
|
Constructor
constructor(factories: KeyValueDifferFactory[])Parameters
|
Properties
Property | Description |
---|---|
factories: KeyValueDifferFactory[]
|
Methods
find() | |||
---|---|---|---|
find(kv: any): KeyValueDifferFactoryParameters
Returns
|
© 2010–2020 Google, Inc.
Licensed under the Creative Commons Attribution License 4.0.
https://v9.angular.io/api/core/KeyValueDiffers