Interface
FieldSignalContext
@ng-forge/dynamic-forms
Field signal context - the "nervous system" of the dynamic form.
Provided via FIELD_SIGNAL_CONTEXT injection token.
Gives mappers and components access to form state, values, and configuration. Container fields (Group, Array) create scoped contexts with nested forms.
The form property uses Angular's FieldTree which includes Subfields<TModel>
for type-safe child field access via bracket notation when TModel is a Record.
Note: Form-level configuration (defaultValidationMessages, formOptions, defaultProps)
is provided via dedicated injection tokens (DEFAULT_VALIDATION_MESSAGES, FORM_OPTIONS,
DEFAULT_PROPS) at the DynamicForm level and inherited by all children.
Signature
interface FieldSignalContext<
TModel extends Record<string, unknown> = Record<string, unknown>
>Type Parameters
| Name | Constraint | Default | Description |
|---|---|---|---|
TModel | Record<string, unknown> | Record<string, unknown> | - |
Properties
| Name | Type | Description |
|---|---|---|
injector | Injector | - |
value | WritableSignal<Partial<TModel>> | - |
defaultValues | () => TModel | - |
form | FieldTree<TModel> | - |
currentPageValid ? | Signal<boolean> | Current page validity signal for paged forms. Used by next button to determine disabled state. |
packages/dynamic-forms/src/lib/mappers/types.ts:19