I have a routes file as below and am getting an error saying "ccYear expected to be a string". Maybe I'm not following the implementation, but what I expect is that I have several routes.add(...), and whatever I put in the 2nd parameter will be matched to see if the incoming routes matches the parameter with a regex compare. Once one is found (in order of added), the route is executed to the /pages/{third parameter}.
I have two issues. First, is if I only have one route
I get the error "ccYear expted to be a string. My URL is /session/2018/sort/title
The second issue, is when I have multipe route add, I don't get the first route matched processed. I either get 404 or this ccYear error. Here is the order of the adds
I have a routes file as below and am getting an error saying "ccYear expected to be a string". Maybe I'm not following the implementation, but what I expect is that I have several routes.add(...), and whatever I put in the 2nd parameter will be matched to see if the incoming routes matches the parameter with a regex compare. Once one is found (in order of added), the route is executed to the /pages/{third parameter}.
I have two issues. First, is if I only have one route
routes.add("r1","/session/:ccYear([0-9][0-9][0-9][0-9])/sort/title","sessionPageByTitle");
I get the error "ccYear expted to be a string. My URL is /session/2018/sort/title
The second issue, is when I have multipe route add, I don't get the first route matched processed. I either get 404 or this ccYear error. Here is the order of the adds