【发布时间】:2015-06-23 22:52:58
【问题描述】:
我想让布局模板动态化。布局模板的值将使用 Meteor.call 'getLayoutTemplate' 在服务器中获取。我应该把 Meteor.call 放在哪里?它应该等到它获取 Meteor.call 的值。有什么想法吗?
Router.configure
layoutTemplate: ????
notFoundTemplate: 'notFound'
【问题讨论】:
-
我的第一个想法是,将其放入 Session-Variable。
-
@DanielBudick 那是个好主意。但是我应该把 Meteor.call 放在哪里呢?因为该会话变量的值将来自服务器(Meteor.call)
标签: javascript node.js meteor coffeescript iron-router