7
在一个新的余烬应用程序,你写第一:为什么ember-cli使用extend而不是create?
var App = Ember.Application.create({
test: 'foo',
...
});
在一个新的余烬-CLI应用程序,你写第一:
var App = Ember.Application.extend({
test: 'foo',
...
});
为什么?
(在第二种情况下,我不能从控制器读取一个全局属性(App.test)。!?)
尝试阅读本文,以了解有关ember-cli进口和出口模块的小部分内容http://iamstef.net/ember-cli/#using-modules和http://iamstef.net/ember-cli/#naming -conventions – Grapho