Skip to main content
cngx-src documentation

CngxAccordionItemContent

Directivev0.1.0WCAG AA

projects/ui/accordion/accordion-item-content.directive.ts

Import#

import { CngxAccordionItemContent } from '@cngx/ui/accordion'

Description#

Structural slot marking a CngxAccordionItem's region body as lazy. The item renders it via ngTemplateOutlet only after the region has first opened (a hasOpened linkedSignal), then keeps it alive. Without this directive the item projects its body eagerly through the default slot; with it, the body is absent from the DOM until first expansion.

<cngx-accordion-item>
  <span cngxAccordionItemTitle>Report</span>
  <ng-template cngxAccordionItemContent>
    <expensive-report />
  </ng-template>
</cngx-accordion-item>

Metadata#

Dependencies#

TemplateRefinject()templateRef