Closed Mokto closed 8 years ago
Docs for transient fields need updating. See docs for events: http://jagi.github.io/meteor-astronomy/v2#events
Basically, event functions now take parameter for the event object. Try this:
afterInit: function(e) { console.log(e.currentTarget); }
Yes I have to update this example in the documentation. It's for version 1.0. Right now you can access document using code presented by @joefru
Ok thanks !!
So I assume I can do something e.currentTarget.age = 30
? (to modify the doc when it is initialized)
Yes exactly.
afterInit(e) {
const doc = e.currentTarget;
doc.age = 30;
}
I've updated also documentation page
Hi,
I'm trying to create a transient field as explained here : http://jagi.github.io/meteor-astronomy/#transient-fields
But I'm stuck because this is undefined. A look at my Astronomy class :
Thanks for your great project, migrating from simple schema is hard but it is worth it ! ;)