Ngx meta.makemetadatamanagerproviderfromsetterfactory
Home > @davidlj95/ngx-meta > makeMetadataManagerProviderFromSetterFactory
makeMetadataManagerProviderFromSetterFactory() function
Creates an Angular's Factory provider that provides an NgxMetaMetadataManager
Signature:
makeMetadataManagerProviderFromSetterFactory: <T>(setterFactory: MetadataSetterFactory<T>, opts: {
d?: FactoryProvider['deps'];
id?: string;
jP: MetadataResolverOptions['jsonPath'];
g?: MetadataResolverOptions['global'];
m?: MetadataResolverOptions['objectMerge'];
}) => FactoryProvider
Parameters
Parameter | Type | Description |
---|---|---|
setterFactory | MetadataSetterFactory<T> | Function that creates a NgxMetaMetadataManager given some dependencies. See MetadataSetterFactory |
opts | { d?: FactoryProvider['deps']; id?: string; jP: MetadataResolverOptions['jsonPath']; g?: MetadataResolverOptions['global']; m?: MetadataResolverOptions['objectMerge']; } | Options to create the factory. d is the list of dependencies to inject. Defaults to no dependencies id is the NgxMetaMetadataManager.id to use. Defaults to resolver options jsonPath joined by dots. jP is the jsonPath that will be used for the MetadataResolverOptions.jsonPath g is the global that will be used for the MetadataResolverOptions.global m is the objectMerge that will be used for the MetadataResolverOptions.objectMerge |
Returns:
FactoryProvider
Remarks
Factory providers are used for built-in modules instead of Angular services. Reason is that code created by @Injectable
decorator takes many bytes, whereas a call to this function creating a factory provider takes few.