Skip to main content
cngx-src documentation

CNGX_MAT_TAB_HANDLE_FACTORY

Tokenv0.1.0WCAG AA

InjectionToken<CngxMatTabHandleFactory>

Description#

DI token fronting the per-tab handle factory used by [cngxMatTabs]. Default is createMatTabHandle. Symmetric with CNGX_MAT_STEP_HANDLE_FACTORY and CNGX_TAB_OVERFLOW_DOM_ADAPTER_FACTORY.

The seam separates handle shape (factory body) from id keying (the supplied idSeed closure). Overrides may call, ignore, or replace idSeed - server-synced ids, deterministic test ids, consumer-domain ids - without touching the factory body.

providers: [
  {
    provide: CNGX_MAT_TAB_HANDLE_FACTORY,
    useValue: ((tab, idSeed, injector) => {
      const setup = createMatTabHandle(tab, idSeed, injector);
      reportTabRegistered(setup.handle.id);
      return setup;
    }) satisfies CngxMatTabHandleFactory,
  },
]

Type#

InjectionToken<CngxMatTabHandleFactory>

Provided in#

'root'