Skip to main content
cngx-src documentation

CNGX_FORM_FIELD_HOST

Tokenv0.1.0WCAG AA

InjectionToken<CngxFormFieldHostContract>

Description#

Injection token resolving to the surrounding form-field-host contract, if any. Provided by CngxFormFieldPresenter (in @cngx/forms/field) via useExisting so any control mounted inside a cngx-form-field can read showError and call markAsTouched() reactively without referencing the concrete presenter class.

Optional in standalone use: a control mounted outside a cngx-form-field should inject with { optional: true } and treat the absence as "no field-level visibility gate, no touched-feedback channel".

Type#

InjectionToken<CngxFormFieldHostContract>