Вопрос

// 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

Это было полезно?

Решение

You got a 't' that should be a 'T' in notFoundtemplate.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top