I have a page being redirected to from external to the backbone codebase. It has two parameters:
- ID: An integer
- CODE: A random printable ascii string (no
#
or&
or?
, but can include-
and always includes a/
)
Not sure if CODE
param is %encoded or not. Think I can get them to control that if required. But issue at the moment is just matching.
I am a maintenance programmer, not my app originally, so just trying to make code that "fits".
Most of the existing routes just take a single ID. e.g.
"account-edit-:accountId" : "accountEditRoute"
But how do I pass my two params in to my process route. I have tried:
"process-:id-:code" : "processCode"
"process-[^-]*-:code" : "processCode"
"process-:id/:code" : "processCode"
"process-:id/*" : "processCode"
And my code handler is like:
processCode: function(id, code) {
...
}
I am always getting the unknown route handler. So how can I match the above.
Sorry if this is a dumb question - but they (wisely) don't normally let me near the front end, so all very new to me.