You can use either bind or jQuery.proxy . bind provided in JS since version 1.8.5, so it is quite safe to use it if you do not need to support very old browsers. http://kangax.imtqy.com/es5-compat-table/
In any case, you basically manually look at the this object.
So, if you have this IndexController and you want to run raiseAlert from outside the application.
App.IndexController = Ember.ArrayController.extend({ testValue : "fooBar!", actions : { raiseAlert : function(source){ alert( source + " " + this.get('testValue') ); } } });
With bind :
function externalAlertBind(){ var controller = App.__container__.lookup("controller:index"); var boundSend = controller.send.bind(controller); boundSend('raiseAlert','External Bind'); }
With jQuery.proxy
function externalAlertProxy(){ var controller = App.__container__.lookup("controller:index"); var proxySend = jQuery.proxy(controller.send,controller); proxySend('raiseAlert','External Proxy'); }
Interestingly, this seems OK without using bind or proxy in this JSBin.
function externalAlert(){ var controller = App.__container__.lookup("controller:index"); controller.send('raiseAlert','External'); }
Here JSBin shows all of them: http://jsbin.com/ucanam/1080/edit
[UPDATE]: another JSBin that calls filter in action: http://jsbin.com/ucanam/1082/edit
[UPDATE 2]: I have everything to work by looking at "controller:booksIndex" instead of "controller:books-index" .
Here's JSBin: http://jsbin.com/ICaMimo/1/edit
And a way to see how it works (since the routes are weird): http://jsbin.com/ICaMimo/1#/index