【发布时间】:2014-05-19 21:34:39
【问题描述】:
使用 Meteor Iron-Router 我如何将数据呈现为 JSON 或简单地“原始”显示(没有布局模板)
基本上我希望能够做类似的事情:
this.route('rawdata', {
path: '/raw/:collection',
layoutTemplate: 'nolayout',
template: 'raw'
})
/raw/posts 将显示 Posts(集合)的原始 json。
谢谢!
注意事项:
我知道JSON endpoint in Meteor 但是meteor-router 已经停产,而且Iron-Router 似乎没有JSON 端点功能。
我还查看了https://atmospherejs.com/package/collection-api,但它不适合我的需要,因为我需要能够选择集合/记录的字段子集。
【问题讨论】:
标签: json meteor iron-router