---
lang: en
title: 'API docs: context.binding.to'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.context.binding.to.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [Binding](./context.binding.md) &gt; [to](./context.binding.to.md)

## Binding.to() method

Bind the key to a constant value. The value must be already available at binding time, it is not allowed to pass a Promise instance.

<b>Signature:</b>

```typescript
to(value: T): this;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  value | <code>T</code> | The bound value. |

<b>Returns:</b>

`this`

## Example


```ts
ctx.bind('appName').to('CodeHub');

```


