为什么在 ember 数据库中,在初始化期间,初始化程序 'injectStore' 在 'store' 初始化程序之前被调用(所以在 store 被 regitered 之前)?
https://github.com/emberjs/data/blob/master/packages/ember-data/lib/initializers.js#L49
Ember.onLoad('Ember.Application', function(Application) {
Application.initializer({
name: "store",
initialize: function(container, application) {
application.register('store:main', application.Store || DS.Store);
...
--
https://github.com/emberjs/data/blob/master/packages/ember-data/lib/initializers.js#L97
Application.initializer({
name: "injectStore",
before: "store",
initialize: function(container, application) {
application.inject('controller', 'store', 'store:main');
application.inject('route', 'store', 'store:main');
...
不应该,先注册后注入?