Page Contents
Home > @loopback/context > Binding > toAlias
Binding.toAlias() method
Bind the key to an alias of another binding
Signature:
toAlias(keyWithPath: BindingAddress<T>): this;
Parameters
| Parameter | Type | Description |
|---|---|---|
| keyWithPath | [BindingAddress](/doc/en/lb4/apidocs.context.bindingaddress.html)<T> | Target binding key with optional path, such as `servers.RestServer.options#apiExplorer` |
Returns:
this