dimanche 28 juin 2015

Emberjs loadInitializer error

Not sure how to correct this error. I'm following along with this screencast https://www.youtube.com/watch?v=vLXGKNA4P_g and it appears that the update to Ember breaks functionality.

DEPRECATION: `lookup` was called on a Registry. The `initializer` API 
no longer receives a container, and you should use an `instanceInitializer` to look up objects from the container. 
See http://ift.tt/1NsjWCm
instances-in-initializers for more details.

I'm new to Ember and have found the http://ift.tt/1TZoc1m thread on github but I'm not quite sure how to fix this. This is my app.js file

import Ember from 'ember';
import Resolver from 'ember/resolver';
import loadInitializers from 'ember/load-initializers';
import config from './config/environment';

var App;

Ember.MODEL_FACTORY_INJECTIONS = true;

App = Ember.Application.extend({
  modulePrefix: config.modulePrefix,
  podModulePrefix: config.podModulePrefix,
  Resolver: Resolver
});

loadInitializers(App, config.modulePrefix);

export default App;

Can someone explain how to make this compliant with the error? The documentation suggests this:

http://ift.tt/1B0z5ED

But being new to Ember, I'm not sure what this means or how to implement it.




Aucun commentaire:

Enregistrer un commentaire