I use the template data context inside a template's created
function.
Template.temp.created = function() { console.log('this.data'); };
When I go to the page normally--i.e. click the link to the page--I see the console log the correct data object. When I hit the refresh button on the page, this.data
is null
.
Why?
Also, I am using iron-router to set the data context:
...
this.route('temp', {
...
data: function() { return MyCollection.findOne(someId); },
...
}
...