-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug #80
Comments
Manually patch the Path.match function to this: 'match': function (path, parameterize) {
var params = {}, route = null, possible_routes, slice, i, j, compare, sliceParts, compareParts;
for (route in Path.routes.defined) {
if (route !== null && route !== undefined) {
route = Path.routes.defined[route];
possible_routes = route.partition();
for (j = 0; j < possible_routes.length; j++) {
slice = possible_routes[j];
compare = path;
if (slice.search(/:/) > 0) {
sliceParts = slice.split("/");
for (i = 0; i < sliceParts.length; i++) {
compareParts = compare.split("/");
if ((i < compareParts.length) && (sliceParts[i].charAt(0) === ":")) {
params[sliceParts[i].replace(/:/, '')] = compareParts[i];
compareParts[i] = sliceParts[i];
compare = compareParts.join('/');
}
}
}
if (slice === compare) {
if (parameterize) {
route.params = params;
}
return route;
}
}
}
}
return null;
} This solves any issue with parameter values that are in any part of the path already (like '#/category/12/sort/sort' or '#admin/edit/a'). Greetings |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
go to '#/category/12/sort/category)' or '#/category/12/sort/sort)' and as a result we will have alert 'Rescue!'
The text was updated successfully, but these errors were encountered: