Skip to main content
cngx-src documentation

CngxErrorScopeFieldBridge

Directivev0.1.0WCAG AA

projects/forms/field/error-scope-field-bridge.directive.ts

Import#

import { CngxErrorScopeFieldBridge } from '@cngx/forms/field'

Description#

Bridges an ambient CngxErrorScope (from @cngx/common/interactive) into the Forms-local CNGX_FORM_FIELD_REVEAL contract.

Wired into CngxFormField as a hostDirective so every form-field automatically picks up the nearest scope without consumer-side wiring. The presenter only ever reads CNGX_FORM_FIELD_REVEAL; this directive is the single integration point between @cngx/forms/field and the @cngx/common/interactive scope token.

No-op when no ancestor scope is provided - the form-field falls back to the default error gate (touched OR errorStrategy(...)).

Metadata#

Providers#

Relationships