Page Contents
Home > @loopback/context > config > view
config.view() function
@inject.view decorator to inject a config context view to allow dynamic changes in configuration
Signature:
view: (propertyPath?: string | ConfigInjectionMetadata, metadata?: ConfigInjectionMetadata) => (target: Object, member: string | undefined, methodDescriptorOrParameterIndex?: number | TypedPropertyDescriptor<any> | undefined) => void
Parameters
| Parameter | Type | Description |
|---|---|---|
| propertyPath | string \| [ConfigInjectionMetadata](/doc/en/lb4/apidocs.context.configinjectionmetadata.html) | _(Optional)_ Optional property path of the config object |
| metadata | [ConfigInjectionMetadata](/doc/en/lb4/apidocs.context.configinjectionmetadata.html) | _(Optional)_ Injection metadata |
Returns:
(target: Object, member: string | undefined, methodDescriptorOrParameterIndex?: number | TypedPropertyDescriptor<any> | undefined) => void