且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

流星动态模板不起作用

更新时间:2022-02-04 04:34:49

此路线:

FlowRouter.route('/', {
  action() {
    BlazeLayout.render('mainLayout', { content: 'mainLayout' });
  },
});

无效,因为您正在将mainLayout组件插入自身-嵌套的content助手是问题所在.相反,您应该在content中渲染另一个组件:

is not going to work because you are inserting the mainLayout component into itself - the nested content helper is the issue. Instead, you should be rendering a different component into content:

BlazeLayout.render('mainLayout', { content: 'home' }); // or whatever component should be at "/"