Hi, please help here is my code I’m not sure why it is not getting the id:
Template.chats.helpers({
currentId: function() {
return Router.current().params._id;
console.log(Router.current().params._id);
}
})
my template:
my Route:
Router.route(“editGroup”,{
layoutTemplate: null,
path: “/editGroup/:_id”,
waitOn: function(_id) {
return [this.subscribe(“groups”,this.params._id),this.subscribe(“editGroup”,this.params._id)];
},
data: function() {
return Groups.findOne(this.params._id);
}
})