$route should allow regexps params #918

Closed
vojtajina opened this Issue Apr 29, 2012 · 12 comments

Projects

None yet
@vojtajina
Contributor

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.

@hkdobrev
Contributor

+1

@zygimantas

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

@blainegarrett

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

@lrlopez
Contributor
lrlopez commented Nov 18, 2012

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

@petrovalex
Contributor

@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
lucsky commented Jan 11, 2013

+1

@rzajac
rzajac commented Jan 21, 2013

+1

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

Enhanced route syntax #5

0 of 4 tasks complete
@tahir-asadov

+1

@atian25
atian25 commented Jun 20, 2013

when will this merge to master?

@btford btford closed this Aug 24, 2013
@btford
Contributor
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.

Thanks!

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