Access to storage from initializer in ember-cli

I have an initializer, and the following returns as undefined:

container.lookup ('store: Main')

I am trying to implement this: http://say26.com/using-rails-devise-with-ember-js

Does anyone have any idea why this is?

+4
source share
1 answer

Here is a snippet of code on how I was able to deploy the repository to all components.

//initializers/general-setup.js
import Ember from 'ember';

//The intent of this file is to hold initializers
//that are general and lack specific context or scope
export default {
    name: 'general-setup',
    after: 'store',
    initialize: function(container) {
        container.injection('component', 'store', 'store:main');

    }
};
+3
source

All Articles