Hello there,
I am trying to implement routing with the help of flow router But it is not working for me as what i had expected. I will share my code and the error i am getting int he routing . Please tell me where i am going wrong in a code. As i am new to Meteor I am not able to figure out any solution. Here is my code for flow routing.
code:-
FlowRouter.route(’/’,{
name:‘home’,
action(){
BlazeLayout.render("HomeLayout");
}
});
FlowRouter.route(’/test’,{
name:‘test’,
action(){
BlazeLayout.render('MainLayout',{main:'Test'});
}
});
Here is the Error that i am getting when i go to localhost:3000/test
modules-runtime.js:36Uncaught Error: Cannot find module './main.html’
debug.js:41Exception in defer callback: Error: Expected template or null, found: undefined
at ._render (http://localhost:3000/packages/spacebars.js?hash=65db8b6a8e3fca189b416de702967b1cb83d57d5:61:13)
at doRender (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2027:25)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1875:20
at Function.Template._withTemplateInstanceFunc (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:3687:12)
at http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1873:29
at Object.Blaze._withCurrentView (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:2214:12)
at viewAutorun (http://localhost:3000/packages/blaze.js?hash=ef41aed769a8945fc99ac4954e8c9ec157a88cea:1872:18)
at Tracker.Computation._compute (http://localhost:3000/packages/tracker.js?hash=f525263111eb9d90f4ce1ad064f97aca4a6c1b07:339:36)
at new Tracker.Computation (http://localhost:3000/packages/tracker.js?hash=f525263111eb9d90f4ce1ad064f97aca4a6c1b07:229:10)
at Object.Tracker.autorun (http://localhost:3000/packages/tracker.js?hash=f525263111eb9d90f4ce1ad064f97aca4a6c1b07:604:11)