mirror of
https://github.com/vale981/Vulcan
synced 2025-03-10 12:36:39 -04:00
19 lines
486 B
JavaScript
19 lines
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"))};
|
||
|
}
|
||
|
});
|