---
lang: en
title: 'API docs: context.contextview._constructor_'
keywords: LoopBack 4.0, LoopBack 4, Node.js, TypeScript, OpenAPI
sidebar: lb4_sidebar
editurl: https://github.com/strongloop/loopback-next/tree/master/packages/context
permalink: /doc/en/lb4/apidocs.context.contextview._constructor_.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; [(constructor)](./context.contextview._constructor_.md)

## ContextView.(constructor)

Create a context view

<b>Signature:</b>

```typescript
constructor(context: Context, filter: BindingFilter, comparator?: BindingComparator | undefined);
```

## Parameters

|  Parameter | Type | Description |
|  --- | --- | --- |
|  context | [Context](./context.context.md) | Context object to watch |
|  filter | [BindingFilter](./context.bindingfilter.md) | Binding filter to match bindings of interest |
|  comparator | [BindingComparator](./context.bindingcomparator.md) \| undefined | Comparator to sort the matched bindings |


