@loopback/docs
Version:
Documentation files rendered at [https://loopback.io](https://loopback.io)
36 lines (23 loc) • 1.11 kB
Markdown
---
lang: en
title: 'API docs: context.contextview.once'
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.once.html
---
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [ContextView](./context.contextview.md) > [once](./context.contextview.once.md)
## ContextView.once() method
The "bind" event is emitted when a new binding is added to the view.
<b>Signature:</b>
```typescript
once(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 | <V>(event: [ContextViewEvent](./context.contextviewevent.md)<!-- --><V>) => void | The listener function to call when the event is emitted. |
<b>Returns:</b>
this