$route should allow regexps params #918

vojtajina opened this Issue Apr 29, 2012 · 12 comments


None yet

things like: /some/:param ([0-9]*)

or allow list of values, eg. /some/:param where param can be one of ['one', 'two', 'three']

Check out server side frameworks and their routing.




I would recommend /some/<param:[0-9]*> pattern.


Additionally, I'd like to be able to include slashes as valid strings in the match. This appears not to work currently.

lrlopez commented Nov 18, 2012

@blainegarrett, you should have a look into PR #1560 as it allows matching arbitrary strings which also include slashes.


@blainegarrett I was able to include slashes as valid string in my implementation just by extending the $routeProvider.shortcuts with { "path": { regex: "[\w\/]+" } } and then specifying the constraint for the parameter to be path. actually, I have exposed this shortcuts object, so that it is configurable from outside

lucsky commented Jan 11, 2013


rzajac commented Jan 21, 2013


@lrlopez lrlopez referenced this issue in angular-ui/ui-router Jan 25, 2013

Enhanced route syntax #5

0 of 4 tasks complete


atian25 commented Jun 20, 2013

when will this merge to master?

@btford btford closed this Aug 24, 2013
btford commented Aug 24, 2013

As part of our effort to clean out old issues, this issue is being automatically closed since it has been inactivite for over two months.

Please try the newest versions of Angular (1.0.8 and 1.2.0-rc.1), and if the issue persists, comment below so we can discuss it.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment