This provides a polyfill for the Ember.getOwner feature added in Ember 2.3.
ember install ember-getowner-polyfill
import Ember from'ember';
let owner = Ember.getOwner(this);
// do stuff with owner
After you upgrade your application to Ember 2.3, you should remove ember-getowner-polyfill from
Addons generally support many different Ember versions, so leaving ember-getowner-polyfill in
place for consumers of your addon is perfectly normal. When the addon no longer supports Ember
versions older than 2.4, we recommend removing ember-getowner-polyfill from your package.json
and doing a major version bump.
The returned owner object should support all of the methods of the ContainerProxyMixin and RegistryProxyMixin.