jeudi 18 février 2016

Sending Ember Highcharts events back to parent component

I'm using Ember 2.3 and have built a controller around Ember Highcharts. When a chart point is clicked I send that event back to the controller via the following nasty bit of code added to the highcharts configuration object:

Graph.__container__.lookup('controller:accounts.account.outlets.outlet.ratings').send('pointClick', event);

(I know this is fundamentally wrong and should be using getOwner.lookup for the container reference)

This works without issue, but I'm now refactoring this controller to a component and can't think how to pass the graph event back to the component as components are not registered in the app container.

Any pointers to how to achieve this would be very much appreciated!

Thanks.




Aucun commentaire:

Enregistrer un commentaire