Skip to content

Commit 0c13c29

Browse files
author
Jacob Carter
committed
Updated README.md
1 parent 04356c8 commit 0c13c29

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

README.md

+31
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,37 @@ All of this attributes can receive an optional function to be called before chan
9595

9696
In this case, the `setMode` function will be called before going to the next step.
9797

98+
## Wizard Dynamic Steps
99+
A step can be conditionally disabled and may change at any time either adding it or removing it from the wizard step flow.
100+
101+
**Example**
102+
103+
HTML
104+
````html
105+
<wizard on-finish="finishedWizard()">
106+
<wz-step title="Starting" wz-disabled="{{disabled}}">
107+
<h1>This is the first step</h1>
108+
<p>Here you can use whatever you want. You can use other directives, binding, etc.</p>
109+
<input type="submit" wz-next value="Continue" />
110+
</wz-step>
111+
<wz-step title="Continuing">
112+
<h1>Continuing</h1>
113+
<p>You have continued here!</p>
114+
<input type="submit" wz-next value="Go on" />
115+
</wz-step>
116+
<wz-step title="More steps">
117+
<p>Even more steps!!</p>
118+
<input type="submit" wz-next value="Finish now" />
119+
</wz-step>
120+
</wizard>
121+
````
122+
Controller
123+
````javascript
124+
//this will cause the step to be hidden
125+
$scope.disabled = 'true';
126+
````
127+
128+
98129
## Wizard Step Validation
99130
The wzStep directive has the following options as attributes:
100131
* **canexit**: Here you can reference a function from your controller. If this attribute is listed the funtion must return true in order for the wizard to move to the next step. Promises are supported but must resolve with a thruthy value. If it is ommitted no validation will be required.

0 commit comments

Comments
 (0)