provideRender
Bootstrap @threadplane/render in an Angular application or standalone
component tree.
Registers the shared RenderConfig token and the internal
RenderLifecycleService that coordinates mount/unmount events across
dynamically rendered components. Call this once in bootstrapApplication
(or the root ApplicationConfig).
import { provideRender } from '@threadplane/render';Declaration · overload 1
export declare function provideRender(config: RenderConfig): import("@angular/core").EnvironmentProviders;Parameters
config· requiredRenderConfigOptions bag that controls the render feature set:
registry— component registry returned by defineAngularRegistry; maps tool-call names to Angular components.store— optionalStateStorefor\@json-render/corestate binding.functions— optional map of computed functions available inside specs.handlers— optional map of event handlers triggered by spec actions.
Returns
import("@angular/core").EnvironmentProvidersAn EnvironmentProviders value suitable for the providers array
of bootstrapApplication or ApplicationConfig.
Examples
// main.ts
import { bootstrapApplication } from '@angular/platform-browser';
import { defineAngularRegistry, provideRender } from '@threadplane/render';
import { DayCardComponent } from './day-card.component';
const registry = defineAngularRegistry({ day_card: DayCardComponent });
bootstrapApplication(AppComponent, {
providers: [
provideRender({ registry }),
],
});