packages/components/eui-wizard/services/eui-wizard.service.ts
Service for managing wizard state and navigation in eui-wizard components. Tracks active step index, handles step transitions, and integrates with Angular Router for URL-based navigation. Provides programmatic control over wizard progression and step selection. Intended injection scope: Component-level (provided in wizard component). Dependencies: Angular Router for route-based step navigation.
Properties |
Methods |
| init | ||||||||||||
init(steps: EuiWizardStep[], route: ActivatedRoute)
|
||||||||||||
|
Initializes the wizard service with step configuration and routing context. Sets up step collection and determines active step based on current URL. Must be called before using other service methods.
Parameters :
Returns :
void
|
| navigationIncrement | ||||||||
navigationIncrement(increment: number)
|
||||||||
|
Navigates to a step relative to the current active step. Increments or decrements the active step index by the specified amount. Prevents navigation beyond first or last step boundaries.
Parameters :
Returns :
void
|
| selectStep | ||||||||
selectStep(step: EuiWizardStep)
|
||||||||
|
Activates a specific wizard step and navigates to its URL if defined. Updates active step index and triggers route navigation when step has associated URL.
Parameters :
Returns :
void
|
| activeStepIndex |
Type : number
|
Default value : 1
|
| route |
Type : ActivatedRoute
|
| steps |
Type : EuiWizardStep[]
|
Default value : []
|