简体   繁体   中英

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.

I have used flow router for the routing process.

Please help me out. how to do that I am just a newbie in meteorjs

you should try this

FlowRouter.route('/*',{
      name: "routename",
      action: function () {
       BlazeLayout.render('layout', {
           main: "templatename"
       });          
    }
})

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM