mardi 14 avril 2015

container.lookup('store:main') returning undefined

I'm using EmberJS and I have an initializer for loading up the current user in a store. I have no idea why its not working. My current initializer is:



export function initialize(container, application) {
var store = container.lookup('store:main');
console.log(store);
}

export default {
name: 'current-user',
after: 'preload',
initialize: initialize
};


When I log container and convert it to a global variable in the console, and run temp1.lookup('store:main') I get an object. I'm pretty confused right now as to why the initializer isn't able to load the store.





Aucun commentaire:

Enregistrer un commentaire