@threadplane/renderFunctionv0.3.4

provideViews

Register a ViewRegistry for the render engine so generative-UI specs can resolve element types to Angular components. Provide at the application (or a feature route's) environment injector.

import { provideViews } from '@threadplane/render';

Declaration · overload 1

export declare function provideViews(registry: ViewRegistry): import("@angular/core").EnvironmentProviders;

Parameters

registry · required
ViewRegistry

Map of spec element types to the components that render them, typically built with views() / withViews().

Returns

import("@angular/core").EnvironmentProviders

Environment providers to spread into the providers array.

Examples

bootstrapApplication(App, {
  providers: [provideViews(views({ metric: MetricCardComponent }))],
});