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: <T>(event: ContextViewEvent<T> & {
        cachedValue?: T;
    }) => void): this;

Parameters

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

Returns:

this