diff --git a/client/html/not_found.tpl b/client/html/not_found.tpl
index 7804fda9..ac963d45 100644
--- a/client/html/not_found.tpl
+++ b/client/html/not_found.tpl
@@ -1,5 +1,5 @@
-
<%= window.location.pathname %> is not a valid URL.
+
<%= ctx.path %> is not a valid URL.
Back to main page
diff --git a/client/js/controllers/home_controller.js b/client/js/controllers/home_controller.js
index a4c2f7f2..234c04a1 100644
--- a/client/js/controllers/home_controller.js
+++ b/client/js/controllers/home_controller.js
@@ -13,7 +13,7 @@ class HomeController {
registerRoutes() {
page('/', (ctx, next) => { this._indexRoute(); });
- page('*', (ctx, next) => { this._notFoundRoute(); });
+ page('*', (ctx, next) => { this._notFoundRoute(ctx); });
}
_indexRoute() {
@@ -21,9 +21,9 @@ class HomeController {
this._homeView.render({});
}
- _notFoundRoute() {
+ _notFoundRoute(ctx) {
topNavController.activate('');
- this._notFoundView.render({});
+ this._notFoundView.render({path: ctx.canonicalPath});
}
}
diff --git a/client/js/views/not_found_view.js b/client/js/views/not_found_view.js
index f4ce8841..507174ca 100644
--- a/client/js/views/not_found_view.js
+++ b/client/js/views/not_found_view.js
@@ -10,7 +10,7 @@ class NotFoundView {
render(ctx) {
const target = document.getElementById('content-holder');
- const source = this._template({});
+ const source = this._template(ctx);
views.showView(target, source);
}
}