CngxStepperComplete
projects/common/stepper/controls/stepper-complete.directive.ts
Import#
import { CngxStepperComplete } from '@cngx/common/stepper'
Description#
Turns any clickable element into a stepper "Finish" control. Unlike
CngxStepperNext (which reflects the commit state and advances),
the finish action runs: the directive composes CngxAsyncClick via
hostDirectives, so the runner owns the click lifecycle, aria-busy,
and the pending-disable exactly as it does on a standalone button. The
finish action is fed through the aliased [cngxStepperComplete] input.
Resolves its host like the sibling controls - explicit [host] input
falling back to the ambient CNGX_STEPPER_HOST. isActive
exposes whether the active step is the last one, so a consumer renders
the finish control only on the final step. (completed) emits once
after the action resolves successfully.
@if (s.presenter.isLastStep()) {
<button [cngxStepperComplete]="submit" (completed)="done()">Finish</button>
}Metadata#
Index#
Inputs#
Explicit stepper-host reference for placement outside the stepper
tree ([host]="s.presenter"). When unset, the ambient
CNGX_STEPPER_HOST is injected.
null