Skip to main content
cngx-src documentation

injectStatCardConfig

Functionui/stat-cardv0.1.0

projects/ui/stat-card/config/inject-stat-card-config.ts

Description#

Convenience accessor for the stat-card configuration cascade. Runs in injection context; resolves through the priority chain (per-instance Input -> provideStatCardConfigAt -> provideStatCardConfig -> library defaults). Equivalent to inject(CNGX_STAT_CARD_CONFIG) - the helper exists so consumers don't import the token directly.

export class CngxStatCard {
  private readonly cfg = injectStatCardConfig();
  readonly errorText = input<string>(this.cfg.ariaLabels?.errorFallback ?? 'Could not load');
}

Signature#

injectStatCardConfig()

Returns#

CngxStatCardConfig