Skip to main content
cngx-src documentation

withAccordionTemplates

Functionui/accordionv0.1.0

projects/ui/accordion/config/features.ts

Description#

Set app-wide slot templates - the config tier of the slot cascade (*cngxAccordionItemXxx per-instance -> this -> CSS default). Three slots carry a config tier: icon (chevron; $implicit is the item's expanded state), busySpinner (loading/refreshing visual), and error (error affordance). Hand a TemplateRef per key here and every item renders it unless a per-instance slot overrides it. Partial payloads compose - repeated calls merge per key.

provideAccordionConfig(
  withAccordionTemplates({ icon: myChevronTpl, busySpinner: mySpinnerTpl }),
);

Signature#

withAccordionTemplates(payload: NonNullable)

Parameters#

@parampayloadNonNullable

Returns#

CngxAccordionConfigFeature