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