I reference this question and document I know how to bubble up.
But in my situation, I want to bubble down.
Just like I click a button on parent view then trigger some function of all my childview.
var parent = Marionette.CompositeView.extend({
triggers: {
'click #edit': "??" // trigger the childview
}
})
above just the code to describe my concept.
Edit
Or maybe not use the marionette, can use backbone to do the trick?
Does anyone know how to make it?
thanks
If you're using Marionette, then you can access all your child views with
this.children
. Thechildren
property delegates some underscore functions likeinvoke
, so you could callthis.children.invoke
. Something like this might work for your needs: