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

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -