1

I have this route:

Path.map("/(:page_1)(/:page_2)/").to(funct);

and it is not matching

/projects/index2/

it matches /anything but not /anything/anything

Any ideas?

4

1 に答える 1

2

Try wrapping only the second optional value in parentheses. So, instead of doing:

Path.map("#/(:page_1)(/:page_2)/").to(funct);

try:

Path.map("#/:page_1(/:page_2)").to(funct);

Check out this jsfiddle: http://jsfiddle.net/Jkeq9/1/

于 2013-04-29T13:55:07.360 に答える