---
lang: en
title: 'API docs: context.config.view'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.config.view.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [config](./context.config.md) &gt; [view](./context.config.view.md)

## config.view() function

`@inject.view` decorator to inject a config context view to allow dynamic changes in configuration

**Signature:**

```typescript
view: (propertyPath?: string | ConfigInjectionMetadata, metadata?: ConfigInjectionMetadata) => (target: Object, member: string | undefined, methodDescriptorOrParameterIndex?: number | TypedPropertyDescriptor<any> | undefined) => void
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td markdown="1">

propertyPath


</td><td markdown="1">

string \| [ConfigInjectionMetadata](./context.configinjectionmetadata.md)


</td><td markdown="1">

_(Optional)_ Optional property path of the config object


</td></tr>
<tr><td markdown="1">

metadata


</td><td markdown="1">

[ConfigInjectionMetadata](./context.configinjectionmetadata.md)


</td><td markdown="1">

_(Optional)_ Injection metadata


</td></tr>
</tbody></table>

**Returns:**

(target: Object, member: string \| undefined, methodDescriptorOrParameterIndex?: number \| TypedPropertyDescriptor&lt;any&gt; \| undefined) =&gt; void


