我有这条路线:
Path.map("/(:page_1)(/:page_2)/").to(funct);
它不匹配
/projects/index2/
它匹配/anything
但不匹配/anything/anything
有任何想法吗?
我有这条路线:
Path.map("/(:page_1)(/:page_2)/").to(funct);
它不匹配
/projects/index2/
它匹配/anything
但不匹配/anything/anything
有任何想法吗?
尝试仅将第二个可选值包含在括号中。所以,而不是这样做:
Path.map("#/(:page_1)(/:page_2)/").to(funct);
尝试:
Path.map("#/:page_1(/:page_2)").to(funct);
看看这个 jsfiddle:http: //jsfiddle.net/Jkeq9/1/