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 navigation from to be executed from the app router #51

Closed
Alxandr opened this issue Mar 18, 2015 · 3 comments
Closed

Allow navigation from to be executed from the app router #51

Alxandr opened this issue Mar 18, 2015 · 3 comments
Assignees

Comments

@Alxandr
Copy link
Contributor

Alxandr commented Mar 18, 2015

Currently, if you do router.navigate('foo'), it redirects you relative to that router (as it logical), but there should be some way to tell it to redirect you to foo relative to root. I suggest this can be done in two manners. One, with the options object passed to navigate (something like router.navigate('foo', {useAppRouter: true})), and router.navigate('/foo') where the slash at the beginning indicates I want it to be from the root.

I also think that the useAppRouter should take precedence over the slash start though, so that if you explicitly set useAppRouter: false, and pass in /foo it would still redirect relative to the router. I can't really picture a use-case for it, but I'm sure somebody can, and I don't really see a reason it shouldn't be supported.

@Alxandr
Copy link
Contributor Author

Alxandr commented Mar 23, 2015

As far as I can see, your commit does not deal with navigate('/foo') (url's starting with /).

@EisenbergEffect
Copy link
Contributor

No, I'm not changing the '/' aspect at this time. I will consider this for the future.

@Alxandr
Copy link
Contributor Author

Alxandr commented Mar 23, 2015

Fair enough. I'll make a new issue for it then, so it at least get's tracked.

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

2 participants