Skip to main content
cngx-src documentation

CNGX_STATEFUL

Tokenv0.1.0

InjectionToken<CngxStateful>

Description#

DI token for ancestor-/self-discoverable primary async state.

Provided by stateful components (for example CngxSelect.commitState when [commitAction] is set) so that declarative bridges can wire up without an explicit [state] binding.

Resolution precedence in bridges:

  1. Explicit [state] input on the bridge directive
  2. inject(CNGX_STATEFUL, { optional: true })?.state
  3. Dev-mode error if neither is available

Type#

InjectionToken<CngxStateful>