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

Feature: Router#url() accepts extra query parameters as options #396

Merged
merged 6 commits into from
Nov 12, 2017

Conversation

wachunei
Copy link
Contributor

@wachunei wachunei commented Nov 11, 2017

From "Add query parameters argument to Router.prototype.url method" #227 discussion

router.url(name, params [, options]) ⇒ String | Error

Param Type Description
name String route name
params Object url parameters
[options] Object options parameter
[options.query] Object | String query options

Example

router.url('user', { id: 3 }, { query: { limit: 1 } });
// => "/users/3?limit=1"

router.url('user', { id: 3 }, { query: "limit=1" });
// => "/users/3?limit=1"

@wachunei wachunei changed the title Feature: Router#url() to accept extra query parameters as options Feature: Router#url() accepts extra query parameters as options Nov 11, 2017
@jbielick
Copy link
Collaborator

Looks good!

@jbielick jbielick merged commit 2cbeb53 into ZijianHe:master Nov 12, 2017
@wachunei
Copy link
Contributor Author

yay! how likely is this to be released soon on npm? 😅

@jbielick
Copy link
Collaborator

published at 7.3.0

This was referenced Jan 13, 2018
Merged
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

Successfully merging this pull request may close these issues.

2 participants