defineAngularRegistry
Build an AngularRegistry from a plain object mapping tool-call names to Angular components (or fully specified RenderViewEntry objects).
The returned registry is consumed by provideRender to drive dynamic
component rendering.
Entry forms
- Bare
Type<unknown>— the component is paired with the built-inDefaultFallbackComponentwhile its props are still streaming. RenderViewEntryobject — lets you supply a customfallbackcomponent, an optional Standard Schema (schema) used as a mount-readiness gate, and an optionaldescriptionfor model-facing tool registration.
Registry accessor
The returned object exposes a single getEntry(name: string) accessor that
returns the fully-normalized NormalizedEntry (component + fallback +
optional schema + optional description) or undefined when the name is not
registered. Use names() to enumerate all registered names.
import { defineAngularRegistry } from '@threadplane/render';Declaration · overload 1
export declare function defineAngularRegistry(componentMap: RegistryInput): AngularRegistry;Parameters
componentMap· requiredRegistryInputObject whose keys are tool-call names and whose values are either bare Angular component classes or RenderViewEntry objects.
Returns
AngularRegistryAn AngularRegistry with getEntry and names accessors.
Examples
import { defineAngularRegistry } from '@threadplane/render';
import { DayCardComponent } from './day-card.component';
import { LoadingSpinnerComponent } from './loading-spinner.component';
import { z } from 'zod';
export const registry = defineAngularRegistry({
// Bare component — uses DefaultFallbackComponent while streaming.
summary_card: SummaryCardComponent,
// Full entry — custom fallback + schema-gated mounting.
day_card: {
component: DayCardComponent,
fallback: LoadingSpinnerComponent,
schema: z.object({ label: z.string(), day: z.number() }),
description: 'Renders a single itinerary day card.',
},
});
// Look up a registered entry at runtime:
const entry = registry.getEntry('day_card'); // NormalizedEntry | undefined