• 개요
@angular/core

KeyValueDiffers

클래스
안정화

A repository of different Map diffing strategies used by NgClass, NgStyle, and others.

API

    
      class KeyValueDiffers {}
    
    

create

KeyValueDiffers
@paramfactoriesKeyValueDifferFactory[]
@paramparentKeyValueDiffers | undefined

extend

StaticProvider

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.

@paramfactoriesKeyValueDifferFactory[]
사용 시 참고사항

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.

@Component({
  viewProviders: [
    KeyValueDiffers.extend([new ImmutableMapDiffer()])
  ]
})
상세 내용으로 이동