为什么在ember数据库中,在初始化期间,初始化程序'injectStore'在'store'初始化程序之前被调用(因此在存储被注册之前)?
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');
...
不应该,先注册然后注入?