我一直在使用评论功能处理应用程序.这导致必须订阅发表评论的集合和评论集合本身.现在它看起来像这样:
<template name="bookView"> {{> book}} {{> comments}} </template>
this.route('book', {
path: '/book/:_id',
template: 'bookView',
waitOn: function() { return Meteor.subscribe('book');},
action: function () {
if (this.ready()){
this.render();
}
else
this.render('loadingTemplate');
},
data: function() {return Books.findOne(this.params._id);}
});
Run Code Online (Sandbox Code Playgroud)
但是现在我想加载属于那本书的所有评论.或者我应该在Template.comments.rendered中处理评论的订阅?
我刚刚将Meteor更新为0.8.现在我的应用程序崩溃,我得到'火花未定义'.我读过一些文章说这可能与铁路由器包有关.我对我应该采取什么措施纠正这个问题一无所知.