Vulcan/packages/telescope-comments/lib/client/templates/comment_controller/comment_controller.js
2015-09-17 14:51:14 +09:00

19 lines
No EOL
486 B
JavaScript

Template.comment_controller.onCreated(function () {
var template = this;
var commentId = FlowRouter.getParam("_id");
template.subscribe('singleCommentAndChildren', commentId);
if (FlowRouter.getRouteName() === "commentPage") {
template.subscribe('commentUsers', commentId);
template.subscribe('commentPost', commentId);
}
});
Template.comment_controller.helpers({
data: function () {
return {comment: Comments.findOne(FlowRouter.getParam("_id"))};
}
});