Reputation: 13346
Making a user picker controller and am having trouble getting the users out from parent.
Parent template has
{{> userPicker}}
Child updates reactive vars, stored as this.someVar = new ReactiveVar(...)
.
How do I get a ref to this
of userPicker
from parent template?
Upvotes: 3
Views: 667
Reputation: 13346
I ended up passing a dictionary by reference from the parent and had the child put stuff into it.
In parent html
{{> userPicker userContext }}
In parent js
const users = {};
And as helper
userContext() {
return users;
}
Upvotes: 1