Skip to main content
cngx-src documentation

CNGX_BREADCRUMB_COLLAPSE_STRATEGY

Tokenv0.1.0

InjectionToken<CngxBreadcrumbCollapseStrategy>

Description#

DI token for the breadcrumb collapse rule. Defaults to createBreadcrumbCollapse (keep the first crumb + the last maxVisible - 1). Override it in providers (app-wide) or viewProviders (per CngxBreadcrumb instance) to swap the rule - width-aware, keep-first-N, mobile parent-only - without forking the coordinator.

viewProviders: [{
  provide: CNGX_BREADCRUMB_COLLAPSE_STRATEGY,
  useValue: (total, max) => new Set(range(2, total - 2)),
}]

Type#

InjectionToken<CngxBreadcrumbCollapseStrategy>

Provided in#

'root'