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 matching the rest of the path by "*path" parameter #14

Open
prantlf opened this issue Jul 9, 2017 · 3 comments
Open

Allow matching the rest of the path by "*path" parameter #14

prantlf opened this issue Jul 9, 2017 · 3 comments

Comments

@prantlf
Copy link
Contributor

prantlf commented Jul 9, 2017

Using asterisk instead of colon would make the parameter "eat" the rest of the URL path. This is the syntax used by Backbone.js, for example.

Registering the following path in the router:

/start/*rest

would match the following paths and set the following params in the request:

/start/test
  req.params.rest => [ 'test' ]
/start/test1/test2
  req.params.rest => [ 'test1', 'test2' ]
@prantlf
Copy link
Contributor Author

prantlf commented Jul 16, 2017

Would you consider adding this feature, please? It is essential if you develop an SPA and need to divide routing between the server and client routers; the last part of the path needs to be parsed first on the client side.

@prantlf
Copy link
Contributor Author

prantlf commented Oct 5, 2017

Will you consider this feature and/or the related PR #15, please? It is a KO criterion for anything but trivial server-side page handlers.

@prantlf
Copy link
Contributor Author

prantlf commented Jan 1, 2020

I released conenct-route-ext including this feature.

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