【发布时间】:2015-03-06 01:55:08
【问题描述】:
我正在使用 Meteor 创建 Web 应用程序。我已经定义我的布局是:
<template name="default_layout">
{{> header}}
body code here
{{> footer}}
</template>
这是我的路由文件:
Router.configure({ layoutTemplate: 'default_layout'
});
Router.map(function() { this.route('post_list', {path: '/'});
});
所以。我有两个问题:
- 如何使模板
post_list进入default_layout模板的正文代码? - 基于映射页面的每个布局,可能页眉和页脚分别更改内容。那么,模板之间如何联系呢?例如,
post_list模板将为header模板设置一些值...
谢谢:)
【问题讨论】:
标签: meteor