I am using Ember CLI and have read the 1.12.0 release blog entry here:
http://emberjs.com/blog/2015/05/13/ember-1-12-released.html#toc_instance-initializers
and this article:
http://emberjs.com/deprecations/v1.x/#toc_deprecate-access-to-instances-in-initializers
but although I believe I have followed the instructions correctly I am still getting the following deprecation warning:
DEPRECATION:
lookupFactory
was called on a Registry. Theinitializer
API no longer receives a container, and you should use aninstanceInitializer
to look up objects from the container. See http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers for more details.
I have an initializer that injects a service called "ui" and therefore I believe it to be an application initializer rather than an instance initializer (though I have tried both). My initializer code sits under /app/initializers/ui.js and is as follows:
export function initialize(registry, application) {
application.inject('route', 'ui', 'service:ui');
application.inject('controller', 'ui', 'service:ui');
}
export default {
name: 'ui',
initialize: initialize
};
Can anyone advise me what I am doing wrong please?
Thanks!
UPDATE: It looks like others are having similar issues: