I am in a situation where I would like to access instances created from the Ractive component from the parent Ractive. For example.
var myComponent = Ractive.extend(
{
uselessFunction: function()
{
alert('Hello ' + this.data.who);
}
}
);
var myRactive = new Ractive(
{
el: 'body',
components:
{
mycomponent: myComponent
},
template: '{{#people}}<rv-mycomponent who="{{.}}"/>{{/people}}',
data:
{
people:
[
'Mike',
'Charly',
'April'
]
}
}
);
By running this, I get 3 instances of myComponent. Now what I would like would be in some way to call a useless function on any instance of the component from the myRactive method (or even better for all instances).
, (, , - ), - . , myRactive Object, . , , , teardown() myComponent teardown() .