Create an initialization script in EmberJS


Emberjs beginner here.

I have an Emberjs app where I need to execute an initialize function after jquery has been loaded.

Where would I put the said initialize function and how would I call it?

You are looking for Ember initializers.


    name: 'my-initializer',
    after: 'some-other-initializer',

    initialize: function(container, application) {

        very_long_initialization_task_returning_promise().then(function() {

You can use initializers to preload something in the store, organize dependency injections, etc. The after property provides the ability to set the order for the initializers. deferApplicationReadiness and advanceApplicationReadiness allow you to tell Ember when the application is ready to go.

For more details see

If you are using ember-cli, make the hash passed to Ember.Application.initializer above the default export from a file named initializers/my-initializer.js:

export default {
    name: 'my-initializer',