Event handlers invoked when components call emit().
loading
boolean
false
Whether the spec is currently streaming. Passed to all rendered components as the loading input.
Resolution Chain
For registry, store, functions, and handlers, the component resolves values using this priority:
1
Input (highest priority)
Values passed as component inputs.
2
RENDER_CONFIG (from provideRender)
Global defaults provided via provideRender().
3
Internal fallback (lowest priority)
For store: an internal signalStateStore() is created from spec.state (or an empty object). For registry: an empty registry is used (no components resolve).
This means you can set defaults globally and override them per-instance:
// Global configprovideRender({ registry: defaultRegistry, store: globalStore, handlers: { log: (p) => console.log(p) },});// Per-instance override -- only registry is overridden<render-spec [spec]="spec" [registry]="customRegistry" />// store, functions, and handlers fall back to global config
RENDER_CONTEXT
RenderSpecComponent provides a RENDER_CONTEXT injection token to its children via viewProviders. This context is consumed by RenderElementComponent instances and contains:
When spec is null or has no root, nothing is rendered.
Internal Store Behavior
When no store is provided (neither as input nor via RENDER_CONFIG), the component lazily creates an internal signalStateStore() from spec.state. This internal store is created once and reused across spec changes -- it is not recreated when the spec input updates.
// Spec with embedded state -- no external store neededconst spec: Spec = { root: 'root', elements: { root: { type: 'Text', props: { label: { $state: '/message' } } }, }, state: { message: 'Hello' },};
<!-- Internal store is created from spec.state --><render-spec [spec]="spec" [registry]="registry" />
Change Detection
The component uses ChangeDetectionStrategy.OnPush. All reactive updates flow through Angular Signals, ensuring efficient change detection without zone-based triggers.