Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dynamic steps #20

Open
scriptsure opened this issue May 30, 2017 · 5 comments
Open

dynamic steps #20

scriptsure opened this issue May 30, 2017 · 5 comments

Comments

@scriptsure
Copy link

@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

@eberlitz
Copy link
Owner

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>

@scriptsure
Copy link
Author

Right but I can't really use ngrepeat cause I just have a static HTML page with the steps. Any other ideas?

@eberlitz
Copy link
Owner

eberlitz commented May 30, 2017 via email

@scriptsure
Copy link
Author

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...

@johnrix
Copy link

johnrix commented Dec 14, 2017

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants