I have a component that represent a map and after an action in my controller I want to call a method on the component to center the map. The code looks like this
<
You can use on
to have your component listen for an event from the controller, then you can use trigger
in the controller to emit an event.
So in your component you might have something like this:
didInsertElement : function(){
this.get('controller').on('recenter', $.proxy(this.recenter, this));
},
recenter : function(){
this.get("mapView").centerMap()
}
And in your controller you could have :
actions : {
centerMap : function () {
this.trigger('recenter');
}
}