A repository of different iterable diffing strategies used by NgFor, NgClass, and others.
静态属性 属性 说明 static ngInjectableDef : defineInjectable({
providedIn: 'root',
factory: () => new IterableDiffers([new DefaultIterableDifferFactory()])
})
静态方法 static create (factories: IterableDifferFactory[], parent?: IterableDiffers): IterableDiffers
static create ( factories : IterableDifferFactory [], parent ?: IterableDiffers ): IterableDiffers
参数 返回值 IterableDiffers
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.
static extend (factories: IterableDifferFactory[]): StaticProvider
static extend ( factories : IterableDifferFactory []): 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 IterableDiffer
available.
content_copy
@ Component ({
viewProviders : [
IterableDiffers . extend ([ new ImmutableListDiffer ()])
]
})
构造函数