jeudi 2 avril 2015

Call method on an Ember controller from a global function

I have a global function



function onCCSuccess(data) {
// call method on Ember controller and send data
}


That function needs to access a method on a controller inside my Ember app. I can't find out how to do that. When I look at the controller in the browser dev tools I don't see any of my declared properties or methods for the controller.


onCCSuccess gets called from an iFrame page. The iFrame sends data to onCCSuccess and I need to pass that data along to my Ember app. I could just recreate the methods outside the Ember app but that wouldn't be very DRY.





Aucun commentaire:

Enregistrer un commentaire