[英]How to render to not found templte in meteor js if the requested path is not there
I have a meteor website I want to render to the not found template if user enters the url which is not the part of my website or I have not configured.我有一个 meteor 网站,如果用户输入 url 这不是我的网站的一部分或者我没有配置,我想渲染到未找到的模板。
I have used flow router for the routing process.我已将流路由器用于路由过程。
Please help me out.请帮帮我。 how to do that I am just a newbie in meteorjs
怎么做我只是meteorjs的新手
you should try this你应该试试这个
FlowRouter.route('/*',{
name: "routename",
action: function () {
BlazeLayout.render('layout', {
main: "templatename"
});
}
})
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.