diff --git a/client/templates/not_found.html b/client/templates/not_found.html new file mode 100644 index 0000000..2d8bef4 --- /dev/null +++ b/client/templates/not_found.html @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/lib/router.js b/lib/router.js index 44f8eca..53b2ecd 100644 --- a/lib/router.js +++ b/lib/router.js @@ -1,9 +1,11 @@ import "/client/templates/loading.html" import "/client/templates/userPage.html" +import "/client/templates/not_found.html" Router.configure({ layoutTemplate: 'mainLayout', loadingTemplate: 'loading', + notFoundTemplate: 'notFound', waitOn: function () { return Meteor.subscribe("url_res") } @@ -22,3 +24,5 @@ Router.route("/user/:_id", { } }) +Router.onBeforeAction('dataNotFound',{only: 'userPage'}) +