I can’t find the reference at the moment but someone from the core team told me you should never use deferReadiness in intializers. A better place for this sort of logic is in the model or setupController hooks in your application controller.
One problem with deferReadiness is that it prevents the router from displaying a ‘loading’ state. The router does not proceed until the app has finished initialization. Potentially long-running XHR is not a good use case for an initializer and I would agree that the Route.model() hook is a better fit for this.
in your routes/application.js you could do something lik the following:
export default Em.Route.extend({
model: function () {
return yourPreviousDeferReadinessLogic();
}
This will stop the setupController execution until the yourPreviousDeferReadinessLogic promise resolves. If you previously had any other code inside the model hook you could do something like return yourPreviousDeferReadinessLogic().then(...)
@Viki this thread is very old so the code posted above is probably going to need some updating before it works. Are you using an “instance initializer”?