@loopback/docs
Version:
Documentation for LoopBack 4
35 lines (22 loc) • 937 B
Markdown
lang: en
title: 'API docs: context.context.createview'
keywords: LoopBack 4.0, LoopBack 4
sidebar: lb4_sidebar
permalink: /doc/en/lb4/apidocs.context.context.createview.html
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) > [@loopback/context](./context.md) > [Context](./context.context.md) > [createView](./context.context.createview.md)
## Context.createView() method
Create a view of the context chain with the given binding filter
<b>Signature:</b>
```typescript
createView<T = unknown>(filter: BindingFilter, comparator?: BindingComparator): ContextView<T>;
```
## Parameters
| Parameter | Type | Description |
| --- | --- | --- |
| filter | <code>BindingFilter</code> | A function to match bindings |
| comparator | <code>BindingComparator</code> | A function to sort matched bindings |
<b>Returns:</b>
`ContextView<T>`