diff --git a/client/router.js b/client/router.js index a485540..ba632f0 100644 --- a/client/router.js +++ b/client/router.js @@ -153,7 +153,11 @@ Router.prototype.path = function(pathDef, fields, queryParams) { return encodeURIComponent(encodeURIComponent(fields[key] || "")); }); - path = path.replace(/\/\/+/g, "/"); // Replace multiple slashes with single slash + // Prefix the path with the router global prefix + path = this._basePath + path; + + // Replace multiple slashes with single slash + path = path.replace(/\/\/+/g, "/"); // remove trailing slash // but keep the root slash if it's the only one