Page Contents
Home > @loopback/context > ContextView > on
ContextView.on() method
The “bind” event is emitted when a new binding is added to the view.
Signature:
on(eventName: 'bind', listener: <V>(event: ContextViewEvent<V>) => void): this;
Parameters
| Parameter | Type | Description |
|---|---|---|
|
eventName |
‘bind’ |
The name of the event - always |
|
listener |
<V>(event: ContextViewEvent<V>) => void |
The listener function to call when the event is emitted. |
Returns:
this