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

Enhanced route syntax #5

Closed
4 tasks
lrlopez opened this issue Jan 25, 2013 · 5 comments
Closed
4 tasks

Enhanced route syntax #5

lrlopez opened this issue Jan 25, 2013 · 5 comments

Comments

@lrlopez
Copy link

lrlopez commented Jan 25, 2013

Discussion on how augment route definition (regexp, optional params, constraints,...)

We should agree in the following, in no particular order:

  • Optional parameters
  • Type definition (restrict to string, to integers, paths, list). Especially important is the path, as it allows using parameters that contain slashes.
  • Min/max length
  • Regexp syntax

We could use the following pull-requests as a guide:

@gregwebs
Copy link

rather than type definitions, we can allow arbitrary parsers. Instead of 'foo/:int' we can have ['foo', parseInt]. This unloads a bunch of work from our shoulders, and a DSL that uses :int can always be added on top in the future.

@jeme
Copy link
Contributor

jeme commented Jan 30, 2013

@gregwebs I don't quite know how @xealot implemented Improved Angular routing in a backwards compatible way but as I understand werkzeug routing, that is actually what it provides.

e.g. <path:bar> refers to a parser named path.

http://werkzeug.pocoo.org/docs/routing/#custom-converters

Someone noted that they didn't like the syntax, ofc. I wouldn't mind a more familiar syntax. But further than that I have no for or against the syntax as it would only be founded in what I was use to and not objectivity.

@timkindberg
Copy link
Contributor

Closing because we are moving forward with @ksperling implementation, if you need to bring any issues from this discussion over to the new implementation please make a new issue. This thread seems to have some interesting ideas...

@pranaydutta89
Copy link

👍

@christopherthielen
Copy link
Contributor

wat

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

6 participants