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
Post a Comment