Ember Ready

published on January 5, 2013 in technical

Most of you probably know jQuery's ready event. Ember has something similar.

1. What it is good for

We many times need a event fired when all scripts we need are loaded. Ember has something similar, which is a something like a ready event. This is a ready method, which gets invoked immmediately after the routing starts. Like this:

var App = Ember.Application.create({
	ready: function() {
		"use strict";
		console.log("ready");
	}
});

You can do various things here, depending on your application.