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

allow query-param binding by step numbers if no step names are defines #109

Open
luxzeitlos opened this issue Jul 15, 2018 · 2 comments
Open

Comments

@luxzeitlos
Copy link

this would be especially useful for debugging, when no step names are defined, but its undesired that a page refresh brings me back to the first page.

@alexlafroscia
Copy link
Owner

Interesting idea!

At the moment, step names can be numbers, so I am concerned that that and this feature request would conflict with each other...

Any ideas on how this might work?

@luxzeitlos
Copy link
Author

This could be a configuration on the step-manager. Another option would be to prefix the numbers by a magic string. Or a currentId could be provided, that is either a number or a name with a prefix so it can be distinguished. For example all names could be prefixed by a - for the currentId.

{{#step-manager currentId=step as |w|}}
  {{#w.step name='a'}}{{/w.step}}
  {{#w.step}}{{/w.step}}
  {{#w.step name='1'}}{{/w.step}}
{{/step-manager}}

this will result in currentId being either -a, 1 or -1. Other signs then - could be ., _ or ~. However I think it should be nothing that needs percent encoding in the URL.

Also currentId should always be set, even if its not provided initially.

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

No branches or pull requests

2 participants