【发布时间】:2015-05-20 20:54:44
【问题描述】:
刚开始玩流星,我正在尝试使用iron-router 进行路由。这是我的数据结构:
team
_id
name
tags:[{name,counter}]
这是我尝试在 模板
中使用的链接{{#each team.tags}}
<a href="{{ pathFor 'team' _id:parent._id query...? }}">#{{this.name}} <span class="count-list">{{this.counter}}</span></a>
{{/each}}
我的路由器有:
route('/team/:_id') // And I get the search through the GET property... this.params.query
所以:
- 如何在模板中获取父团队_id?
- 如何在
pathFor中传递_id 和搜索参数?
提前致谢。
【问题讨论】:
标签: javascript node.js meteor url-routing iron-router