---
lang: en
title: 'API docs: context.contextview.on_1'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/loopbackio/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.contextview.on_1.html
---

<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [ContextView](./context.contextview.md) &gt; [on](./context.contextview.on_1.md)

## ContextView.on() method

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

**Signature:**

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

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  eventName | 'unbind' | The name of the event - always <code>unbind</code>. |
|  listener | &lt;V&gt;(event: [ContextViewEvent](./context.contextviewevent.md)<!-- -->&lt;V&gt; &amp; { cachedValue?: V; }) =&gt; void | The listener function to call when the event is emitted. |

**Returns:**

this


