Application#deferReadiness()

deferReadinesspublic

Defined in packages/ember-application/lib/system/application.js:491

Use this to defer readiness until some condition is true.

Example:

let App = Ember.Application.create();

App.deferReadiness();

// Ember.$ is a reference to the jQuery object/function
Ember.$.getJSON('/auth-token', function(token) {
  App.token = token;
  App.advanceReadiness();
});

This allows you to perform asynchronous setup logic and defer booting your application until the setup has finished.

However, if the setup requires a loading UI, it might be better to use the router for this purpose.

doc_EmberJs
2016-11-30 16:48:26
Comments
Leave a Comment

Please login to continue.