Page Contents
Home > @loopback/context > Binding > on
Binding.on() method
The “changed” event is emitted by methods such as tag, inScope, to, and toClass.
Signature:
on(eventName: 'changed', listener: BindingEventListener): this;
Parameters
| Parameter | Type | Description |
|---|---|---|
| eventName | ‘changed’ | The name of the event - always changed. |
| listener | BindingEventListener | The listener function to call when the event is emitted. |
Returns:
this