Function

injectFieldSignalContext

@ng-forge/dynamic-forms

Throwing accessor for {@link FIELD_SIGNAL_CONTEXT}.

Use when the consumer requires the context — group/array containers and mappers that depend on form structure. Throws a descriptive DynamicFormError instead of Angular's generic NullInjectorError when the token isn't provided.

Consumers that may legitimately run outside a DynamicForm should keep using inject(FIELD_SIGNAL_CONTEXT, { optional: true }).

Signature

function injectFieldSignalContext<
  TModel extends Record<string, unknown> = Record<string, unknown>
>(): FieldSignalContext<TModel>

Type Parameters

NameConstraintDefaultDescription
TModelRecord<string, unknown>Record<string, unknown>-

Returns

FieldSignalContext<TModel>