Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

$route should allow regexps params #918

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

$route should allow regexps params #918

vojtajina opened this issue Apr 29, 2012 · 12 comments

Comments

@vojtajina
Copy link
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
Copy link
Contributor

+1

@zygimantas
Copy link

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

@blainegarrett
Copy link

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

@lrlopez
Copy link
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
Copy link
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
Copy link

lucsky commented Jan 11, 2013

+1

1 similar comment
@rzajac
Copy link

rzajac commented Jan 21, 2013

+1

@danieljsinclair
Copy link

+1

1 similar comment
@tahir-asadov
Copy link

+1

@atian25
Copy link

atian25 commented Jun 20, 2013

when will this merge to master?

@btford btford closed this as completed Aug 24, 2013
@btford
Copy link
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!

@sky-joaonabais
Copy link

+1

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests