Page Contents
Home > @loopback/context > Context > add
Context.add() method
Add a binding to the context. If a locked binding already exists with the same key, an error will be thrown.
Signature:
add(binding: Binding<unknown>): this;
Parameters
| Parameter | Type | Description |
|---|---|---|
| binding | [Binding](/doc/en/lb4/apidocs.context.binding.html)<unknown> | The configured binding to be added |
Returns:
this