@loopback/docs
Version:
Documentation for LoopBack 4
34 lines (21 loc) • 877 B
Markdown
---
lang: en
title: 'API docs: context.bindingtemplatefor'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.context.bindingtemplatefor.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [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<T | Provider<T>></code> | A class with optional <code>@bind</code> |
<b>Returns:</b>
`BindingTemplate<T>`