You got a 't' that should be a 'T' in notFoundtemplate.
iron-router notFound template not working in meteor
-
15-06-2023 - |
質問
// main.html
<template name="layout">
{{yield}}
</template>
<template name="notFound">
notFound
</template>
// router.js
Router.configure({
layoutTemplate: "layout",
loadingTemplate: "loading",
notFoundtemplate: "notFound"
});
Router.map(function() {
this.route('home', {
path: '/'
});
});
"http://hedcet.com:3000/" working perfectly
but
when i try "http://hedcet.com:3000/x" (route /x) which is not defined in router.js, it shows an error in console & not show notFound template
// console error
Uncaught Error: Oh no! No route found for path: "/x"
could u suggest any solution ? i want to show notFound template if any try a non existing path in meteor
解決
所属していません StackOverflow