-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
feat(router): add params to navigate() #539
base: master
Are you sure you want to change the base?
Conversation
Is this within the scope of the router? (At least it's a quite small addition.) @EisenbergEffect @bryanrsmith @davismj |
Is there anything this solves that doesn't currently work with router.navigateToRoute('main-details', { id: 123, name: 'onetwothree' }); |
@davismj |
@jwx Why would you want to navigate to a route that isn't configured? |
I'm not going to close this. I see a great deal of value in having a utility function that generates a URL with query string parameters as a first-class citizen in Aurelia. I'm just not sure it goes here. It might! |
I think this feature is desirable. Currently I don't see how |
Adds a `params` to the `navigate()` function, so that ``` router.navigate('#/main/:id/details', undefined, { id: 123, name: "onetwothree" }) ``` results in navigation to ``` '#/main/123/details?name=onetwothree' ``` In other words, found named params are placed in the url, not found ones are added to the querystring.
fb2c8a6
to
98d1e50
Compare
@davismj Any chance of getting this merged? |
@bigopon is right. This PR will be very useful when dealing with navigation with child routes |
Adds a
params
parameter to thenavigate()
function, so thatresults in navigation to
In other words, found named params are placed in the url, not found ones are added to the querystring.