Page Contents

Home > @loopback/context > ContextView > observe

ContextView.observe() method

Listen on bind or unbind and invalidate the cache

Signature:

observe(event: ContextEventType, binding: Readonly<Binding<unknown>>, context: Context): void;

Parameters

Parameter Type Description
event [ContextEventType](/doc/en/lb4/apidocs.context.contexteventtype.html)
binding Readonly<[Binding](/doc/en/lb4/apidocs.context.binding.html)<unknown>>
context [Context](/doc/en/lb4/apidocs.context.context.html)

Returns:

void