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 (Optional) Optional property path of the config object
metadata ConfigInjectionMetadata (Optional) Injection metadata

Returns:

(target: Object, member: string | undefined, methodDescriptorOrParameterIndex?: number | TypedPropertyDescriptor<any> | undefined) => void