In Meteor, I send two objects from my db to the template:
Template.myTemplate.helpers({ helper1: function() { var object1 = this; // data context set in iron:router...path is context dependent // modify some values in object1 return this; }, helper2: function() { return Collection2.find({_id: this.object2_id}); } });
This template also has an event handler for modifying the two above objects. I am trying to access helper1 and helper2 from above, but if I call the template data context, I get access to an unmodified version of object1. How to access the helpers mentioned above?
Template.myTemplate.events({ 'submit form': function(event) { event.preventDefault();
source share