ember.js - Changes to initializers in Ember 1.12.0 -


i using ember cli , have read 1.12.0 release blog entry here:

http://emberjs.com/blog/2015/05/13/ember-1-12-released.html#toc_instance-initializers

and article:

http://emberjs.com/deprecations/v1.x/#toc_deprecate-access-to-instances-in-initializers

but although believe have followed instructions correctly still getting following deprecation warning:

deprecation: lookupfactory called on registry. initializer api no longer receives container, , should use instanceinitializer objects container. see http://emberjs.com/guides/deprecations#toc_deprecate-access-to-instances-in-initializers more details.

i have initializer injects service called "ui" , therefore believe application initializer rather instance initializer (though have tried both). initializer code sits under /app/initializers/ui.js , 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 advise me doing wrong please?

thanks!

update: looks others having similar issues:

https://github.com/emberjs/ember.js/issues/11172

http://discuss.emberjs.com/t/dependancy-injection-in-initializers-confusing-registry-container/7972/2

fixed recent updates no longer issue. comments.


Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -