---
lang: en
title: 'API docs: context.contextview.on'
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.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.md)

## ContextView.on() method

The "bind" event is emitted when a new binding is added to the view.

**Signature:**

```typescript
on(eventName: 'bind', listener: <V>(event: ContextViewEvent<V>) => void): this;
```

## Parameters

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

**Returns:**

this


