ember.js - How is ApplicationController automatically generated? -


the ember.js apps

app = ember.application.create(); 

and

app = ember.application.create(); app.applicationcontroller = ember.controller.extend(); 

do same because ember automagically generates applicationcontroller. correct?

so why can access app.applicationcontroller in javascript console second app not first one? when automagically generated should able access in console. wrong assumption?

it's created in both cases, try in javascript console:

//use debug purposes app.__container__.lookup('controller:application'); 

this should give applicationcontroller instance in both cases

altough define controller so:

app.applicationcontroller = ember.controller.extend(); 

if want hook controller

hope helps


Comments

Popular posts from this blog

Winapi c++: DialogBox hangs when breaking a loop -

vb.net - Font adding using PDFsharp -

javascript - jQuery iScroll clickable list elements while retaining scroll? -