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

this.params and array of URLs #203

Closed
nettiopsu opened this issue Nov 3, 2015 · 0 comments
Closed

this.params and array of URLs #203

nettiopsu opened this issue Nov 3, 2015 · 0 comments

Comments

@nettiopsu
Copy link

koa-router supports an array of URLs, but it seems that this.params function is not working in this case:

router.get([
    '/product/:product', // first url in the array
    '/product/:product/account/:account', // second url in the array
    ], function* () {

    console.log(this.params); // undefined for first url

});

Apparently only second (last?) this.params array is working, but not the first one

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

1 participant