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

c++ - Function signature as a function template parameter -

algorithm - What are some ways to combine a number of (potentially incompatible) sorted sub-sets of a total set into a (partial) ordering of the total set? -

How to call a javascript function after the page loads with a chrome extension? -