I have 2 controllers:
$.Controller('App.Browse',
/** @Static */
{
defaults : {}
},
/** @Prototype */
{
init : function(){
$('#map').app_map();
},
// how can I listen here for an event of app_map() controller
})
and
$.Controller('App.Map',
/** @Static */
{
defaults : {}
},
/** @Prototype */
{
init : function(){
// how can I trigger an event to be listened by app_browser() controller
},
})
The short idea is that while I’m in the App.Map controller I would like to notice the App.Browse controller to do something.
JMVC is prepared for that. Just declare it like this:
And instantiate: