A repository of different Map diffing strategies used by NgClass, NgStyle, and others.
静态属性 属性 说明 static ngInjectableDef : ɵɵdefineInjectable({
providedIn: 'root',
factory: () => new KeyValueDiffers([new DefaultKeyValueDifferFactory()])
})
静态方法 static create <S>(factories: KeyValueDifferFactory[], parent?: KeyValueDiffers): KeyValueDiffers
static create < S >( factories : KeyValueDifferFactory [], parent ?: KeyValueDiffers ): KeyValueDiffers
参数 返回值 KeyValueDiffers
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[]): StaticProvider
static extend < S >( factories : KeyValueDifferFactory []): StaticProvider
参数 返回值 StaticProvider
使用说明 Example 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.
content_copy
@ Component ({
viewProviders : [
KeyValueDiffers . extend ([ new ImmutableMapDiffer ()])
]
})
构造函数