Skip to content

Commit 37c9f29

Browse files
authored
Merge pull request #247 from gmanriqueUy/doc-events
Add events docs to README.md
2 parents badc1c8 + 999e094 commit 37c9f29

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,16 @@ The functions available in the `wizard()` are:
223223
* **getEnabledSteps()**: This returns an Array which is the **enabled** steps.
224224
* **setEditMode(boolean)**: Set the edit mode of the wizard. Setting editMode to `true` will make ALL steps accessible, setting edit mode to `false` will make all steps with an index lower than the latest "completed" step accessible.
225225

226+
## Events
227+
Angular Wizard emits the following events on the `scope` and pass an object with the step info and the index as argument:
228+
- `wizard:stepChanged`: When succeed changing the current step
229+
- `wizard:stepChangeFailed`: When changing step and either fails `canexit` of leaving step or `canenter` of arriving step.
230+
````javascript
231+
$scope.$on('wizard:stepChanged',function(event, args) {
232+
console.log(args);
233+
}
234+
````
235+
226236
## Navigation bar
227237

228238
Any changes you wish to make to the navigation bar can be done by overwritting the CSS. Because everyone wants the navigation bar in a different location and in a different style we have provided a default which you can change via your own HTML and CSS. The navigation bar shown below works in the following way:

0 commit comments

Comments
 (0)