UNPKG

@loopback/docs

Version:
35 lines (22 loc) 865 B
--- lang: en title: 'API docs: context.inject.view' keywords: LoopBack 4.0, LoopBack 4 sidebar: lb4_sidebar permalink: /doc/en/lb4/apidocs.context.inject.view.html --- <!-- Do not edit this file. It is automatically generated by API Documenter. --> [Home](./index.md) &gt; [@loopback/context](./context.md) &gt; [inject](./context.inject.md) &gt; [view](./context.inject.view.md) ## inject.view variable Inject matching bound values by the filter function <b>Signature:</b> ```typescript view: (bindingFilter: BindingFilter<unknown>, metadata?: InjectionMetadata | undefined) => (target: Object, member: string, methodDescriptorOrParameterIndex?: number | TypedPropertyDescriptor<any> | undefined) => void ``` ## Example ```ts class MyControllerWithView { @inject.view(filterByTag('foo')) view: ContextView<string[]>; } ```