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: <T>(event: ContextViewEvent<T>) => void): this;

Parameters

Parameter Type Description
eventName ‘bind’ The name of the event - always bind.
listener <T>(event: ContextViewEvent<T>) => void The listener function to call when the event is emitted.

Returns:

this