material-steppers
material-steppers copied to clipboard
dynamic steps
@eberlitz is there a way to do a standard ng-show/ng-hide for steps that are contingent on selection by the user... essentially dynamic steps that using a static HTML page... i cant use an ng-repeat with current code set? I noticed that ng-show actually does work to hide and show the step content but does not actually effect the step header...
thanks
Hi, I've been using an array of steps which I dinamically change in the controller.
<md-step md-label="{{step.title}}" ng-repeat="step in $ctrl.steps">
....
</md-step>
Right but I can't really use ngrepeat cause I just have a static HTML page with the steps. Any other ideas?
Did you tried ngif?
On Tue, May 30, 2017, 15:44 Aaron [email protected] wrote:
Right but I can't really use ngrepeat cause I just have a static HTML page with the steps. Any other ideas?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eberlitz/material-steppers/issues/20#issuecomment-304971178, or mute the thread https://github.com/notifications/unsubscribe-auth/AB45fL3yIinN7WBjopAEkQitla-mw9fQks5r_GOcgaJpZM4NqbQm .
--
Att,
Eduardo Eidelwein Berlitz +55 (51) 8539-8507
so there is an array that controls the step header and when you ng-if it leaves the step when ng-if="false". So in other words ng-if="true" adds it to array, then when ng-if="false" the step is not removed... makes sense...
Steps also appear out of order if the conditional step is not the last when using ng-if.
EDIT: In fact, step numbering also gets messed up if using ng-repeat as suggested above and new steps are inserted ahead of existing steps. For example, if you always have a finally 'Summary' step being presented and you dynamically introduce some new intermediate step, based upon selections made on a prior step, the new step gets a later number than the summary step and is not navigated to in the desired order.