CngxControlValue
projects/common/interactive/control-value/control-value.token.ts
Referenced by#
Import#
import { CngxControlValue } from '@cngx/common/interactive'
Description#
Structural contract every cngx interactive value-bearing atom exposes
to its surrounding form-bridge. Consumers (CngxFormBridge, custom
adapters, test harnesses) pull the token off the host element and
reach the atom's primary value plus its disabled flag without
importing the concrete directive class.
Two-way binding flows through value (a ModelSignal<T>, never a
plain WritableSignal<T>); the model<T>() requirement is part of
the contract because Signal Forms relies on value() being callable
AND value.set(v) triggering the change-event Angular emits for
[(value)] template syntax.
disabled stays a WritableSignal<boolean> because consumers
typically derive it externally (computed(() => parentDisabled() || fieldDisabled()) and forward into the atom) - model<boolean>()
would force every implementer into a two-way binding they do not
need.