Skip to content
Browse files

prefer public DI api on the application instance when possible.

  • Loading branch information...
1 parent 7579054 commit 076b9a1c8df889fdf773f0fd214c5254bda32051 @stefanpenner stefanpenner committed
Showing with 4 additions and 4 deletions.
  1. +4 −4 packages/ember-data/lib/system/application_ext.js
View
8 packages/ember-data/lib/system/application_ext.js
@@ -69,7 +69,7 @@ Ember.onLoad('Ember.Application', function(Application) {
name: "store",
initialize: function(container, application) {
- container.register('store', 'main', application.Store);
+ application.register('store:main', application.Store);
// Eagerly generate the store so defaultStore is populated.
// TODO: Do this in a finisher hook
@@ -80,9 +80,9 @@ Ember.onLoad('Ember.Application', function(Application) {
Application.initializer({
name: "injectStore",
- initialize: function(container) {
- container.typeInjection('controller', 'store', 'store:main');
- container.typeInjection('route', 'store', 'store:main');
+ initialize: function(container, application) {
+ application.inject('controller', 'store', 'store:main');
+ application.inject('route', 'store', 'store:main');
}
});
}

0 comments on commit 076b9a1

Please sign in to comment.
Something went wrong with that request. Please try again.