Page Contents

Home > @loopback/context > ContextView > on

ContextView.on() method

The “unbind” event is emitted a new binding is removed from the view.

Signature:

on(eventName: 'unbind', listener: <V>(event: ContextViewEvent<V> & {
        cachedValue?: V;
    }) => void): this;

Parameters

Parameter Type Description
eventName ‘unbind’ The name of the event - always unbind.
listener <V>(event: ContextViewEvent<V> & { cachedValue?: V; }) => void The listener function to call when the event is emitted.

Returns:

this