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

Dynamically Change Navigation Mode #70

Closed
ChristianM92 opened this issue Nov 6, 2017 · 7 comments
Closed

Dynamically Change Navigation Mode #70

ChristianM92 opened this issue Nov 6, 2017 · 7 comments

Comments

@ChristianM92
Copy link

So my application starts off the navigation mode on strict. Depending on what my function returns, I may want to set the navigation mode to free. I have tried to change it dynamically and the wizard doesn't seem to respond correctly. Is this functionality possible?

@madoar
Copy link
Owner

madoar commented Nov 7, 2017

What do you mean with function? Is this function called only once, during initialization, or at a later time, after the user has entered some input?
Currently the navigation mode is set only during the initialization of the page.
To change it later on, it would be required to implement an ngOnChanges method, inside WizardComponent, which detects changes to the navigationMode and builds based on these changes a new NavigationMode instance.
@ChristianM92 if you want, fell free to open a new PR with these changes.

@ChristianM92
Copy link
Author

The function is called at a later time after some user input. Thanks for the feedback!

@ChristianM92
Copy link
Author

@madoar So I am interested in making the changes and creating the pull request. But this is my first time contributing to a project like this. How do I go about with testing and doing this properly? I don't wanna mess anything up.

@madoar
Copy link
Owner

madoar commented Nov 7, 2017

@ChristianM92 nice to hear, that you want to give this a try :)

For testing I would suggest, that you take a look at other tests as a reference. All test files are named *.spec.ts, i.e. if you're making some changes inside wizard.component.ts, the related tests should most likely be contained in wizard.component.spec.ts.
If you require some help writing the tests I would suggest, that you take a look at https://angular.io/guide/testing.
To run the tests, you just need to execute npm test inside a terminal inside the ng2-archwizard directory.

About how doing this properly:
I believe it's best if you just start by forking the project and implementing your solution for the problem. After you've finished implemented a solution, or when you stumble over an error you don't know how to solve, you can just create a PR.
Afterwards I will take a look at it, and give you some comments. If the PR is complete, and I can't think of anything significant to improve I'll merge it :)

If you've any questions feel free to ask!

@kamlekar
Copy link

kamlekar commented Dec 4, 2017

I have the same requirement. Is this been / being implemented? @ChristianM92 @madoar

@ChristianM92
Copy link
Author

@kamlekar @madoar Other priorities on my project came up so I wasn't able to focus on implementing this feature. Hopefully someone else can add this feature.

@madoar
Copy link
Owner

madoar commented Dec 12, 2017

I don't have time to implement this feature currently too.
But if anyone wants to give it a try, feel free to do so!

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

3 participants