Skip to main content
cngx-src documentation

CngxStepError

Directivev0.1.0WCAG AA

projects/common/stepper/slots/step-error.directive.ts

Import#

import { CngxStepError } from '@cngx/common/stepper'

Description#

Slot directive for the per-step error-message template on <cngx-stepper>. Discovered via contentChild; cascades through CNGX_STEPPER_CONFIG.templates.stepError before falling back to the built-in {{ message }} text. Mirrors CngxStepRejection so consumer-authored templates read the same way across both channels.

<cngx-stepper>
  <ng-template cngxStepError let-message="message" let-errorLabels="errorLabels">
    <strong>{{ message }}</strong>
    @if (errorLabels.length > 1) {
      <ul>
        @for (label of errorLabels; track label) {
          <li>{{ label }}</li>
        }
      </ul>
    }
  </ng-template>
</cngx-stepper>

Metadata#

Index#

Properties

Instance Properties#

templateRef#unknown
Readonly
inject<TemplateRef<CngxStepErrorContext>>(TemplateRef)