【发布时间】:2016-01-01 14:04:02
【问题描述】:
我有一个名为:Orders 的模板,它显示了我的订单图像集合:
{{#each images}}
<div class="images">
<a href="/order/{{this._id}}"> <img class="image" src="{{this.url }}" /></a>
</div>
{{/each}}
不,我希望另一个名为 order 的模板仅向我显示我单击的集合中的一个项目:我尝试这样做:1. 单击图像的 orders.js 事件:
"click .image": function() {
Images.find({_id:this._id});
和orders.html:
<a href="/order/{{this._id}}"> <img class="image" src="{{this.url }}" /></a>
我也有 routes.js :
FlowRouter.route("/orders", { **this part works fine**
action: function(){
FlowLayout.render("layout",{top:"orders", main:"test"});
}
FlowRouter.route('/order/', { **How do I do this part ????????**
action: function(){
FlowLayout.render("layout",{top:"order",data:image});
}
我使用动态布局模板来显示显示良好的订单。 如何设置单序html、路由和渲染???
【问题讨论】:
标签: meteor flowlayout