---
lang: en
title: 'API docs: context.bindingtemplatefor'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.bindingtemplatefor.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [bindingTemplateFor](./context.bindingtemplatefor.md)

## bindingTemplateFor() function

Get the binding template for a class with binding metadata

<b>Signature:</b>

```typescript
export declare function bindingTemplateFor<T = unknown>(cls: Constructor<T | Provider<T>>): BindingTemplate<T>;
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  cls | <code>Constructor&lt;T &#124; Provider&lt;T&gt;&gt;</code> | A class with optional <code>@bind</code> |

<b>Returns:</b>

`BindingTemplate<T>`


