Home > @loopback/context > Context > createView

Context.createView() method

Create a view of the context chain with the given binding filter

Signature:

createView<T = unknown>(filter: BindingFilter, comparator?: BindingComparator, options?: Omit<ResolutionOptions, 'session'>): ContextView<T>;

Parameters

Parameter Type Description
filter BindingFilter A function to match bindings
comparator BindingComparator (Optional) A function to sort matched bindings
options Omit<ResolutionOptions, ‘session’> (Optional) Resolution options

Returns:

ContextView<T>