I understand that Ember.Application is now deferReadiness , which allows me to wait for the AJAX call to return before the application initializes. However, in the example in api docs, they put the value in a global variable in the App:
App = Ember.Application.create(); App.deferReadiness(); jQuery.getJSON("/auth-token", function(token) { App.token = token; App.advanceReadiness(); });
Instead of entering a global variable for the token, I want to put the return value in my ApplicationController. However, I cannot find how to get the handle of the controller at the moment, i.e. in the jQuery callback.
source share