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