Closed D-Ne0 closed 10 years ago
Hi
I have this code which I want to test.
Template.xyz.helpers({ some_helper: function() { var id = Session.get('id'); if(id == this._id) return true; } });
But I don't know how to set the value of this._id. Template.xyz.addContextAttribute('_id', 1) doesn't work. It only works for events I think.
this._id
Template.xyz.addContextAttribute('_id', 1)
That's in the example :)
Here's the code and here's the test setup
My Bad. I missed it. Thanks!
No worries
Hi
I have this code which I want to test.
But I don't know how to set the value of
this._id
.Template.xyz.addContextAttribute('_id', 1)
doesn't work. It only works for events I think.