For each multi-step form rendered, there is an associated Object which is an instance of MultiFormStep
.
It can be injected in step controllers: multiStepFormInstance
myApp.controller('MyStepCtrl', [
'$scope',
'multiStepFormInstance',
function ($scope, multiStepFormInstance) {
/* ... */
}
])
multiStepFormInstance.steps
Array[FormSteps]: The list of configured steps.
multiStepFormInstance.cancel()
Call the provided onCancel
callback or destroy the multi-step form component.
multiStepFormInstance.finish()
Call the provided onFinish
callback or destroy the multi-step form component.
multiStepFormInstance.getActiveIndex()
Return the current step index (starting at 1).
multiStepFormInstance.setActiveIndex(step)
Set the active step to the provided index (starting at 1).
multiStepFormInstance.getActiveStep()
Return the current step (FormStep
Object).
multiStepFormInstance.getSteps()
Return the list of steps (FormStep[]
)
multiStepFormInstance.isFirst()
Return true if the current step is the first step, false otherwise.
multiStepFormInstance.isLast()
Return true if the current step is the last step, false otherwise.
multiStepFormInstance.nextStep()
Navigate to the next step.
multiStepFormInstance.previousStep()
Navigate to the previous step.
multiStepFormInstance.setValidity(isValid[, stepIndex])
Set the validity of the current step (or of the specified step index).