guleria
guleria

Reputation: 751

What is the use of Ember.Application initialize method?

I was trying the routing example in emberjs and I read that App.Initialize initializes all the controllers and inject them to the router (from Emberjs ). That means if I don't call the initialize method on my Ember Application my controllers won't get initiated and my router using those instance of controllers won't work. Right?

Then why this jsfiddle is working when i comment the line App.inialize()

Upvotes: 1

Views: 624

Answers (1)

sly7_7
sly7_7

Reputation: 12011

Hum, the fiddle your are working on refer to an outdated api. Looking to the source, Application#initialize() is now done automatically for you: https://github.com/emberjs/ember.js/blob/master/packages/ember-application/lib/system/application.js#L419

BTW, you are also relying on an old router version. For now I'd suggest you to update to the current master, and read http://emberjs.com/guides/routing/ to see how to define it now.

Upvotes: 5

Related Questions