I’ve been trying to inject a custom store for a few days now (new to ember) without success. I followed the outline used in the video “using ember cli without ember data”. His code works, however running ember --version on it show 0.0.44 and my version is 0.1.7.
my initializer is running, but it seems that the store injection is getting overridden in the route by the default ember store. I can create a new instance of mine and it works, but that defeats the purpose
I tried injecting after the “after: ‘store’” method, but it gives me an error saying a lookup has already been performed and can’t inject. I presume there is an ordering to all this, so how can I tell my initializer to override the default store injection?
have you removed ember data from your Brocfile?
Ember Data will inject its store into your routes and controllers unless you strip it out of Ember.
The only thing in my Brocfile is an import for bootstrap css. I got to thinking though and saw ember data in the bower_components directory. a quick google gave me “npm rm ember-data --save-dev”, which did remove it, but now the app won’t start up saying “no application initializer named ‘route’”.
have you looked at this video? at the 2:50 mark he shows how to remove ember data from the project: Ember without Ember Data - YouTube
edit: nvmd i see that you have watched the video. Can you post a link to a github repo that demonstrates the issue?
I was just getting ready to push this to github and thought I better take another quick look before I pushed something dumb. well, in my initializer I had left an ‘after’ prop from last night when I was trying to get it to work. I removed that and now it all works. Ultimately it was the ember-data library as you suggested causing my issue.
What I don’t understand though is that my brocfile didn’t contain it, much like that video shows it being removed. I had to remove it via bower to really solve it. Being new to ember and cli, that is quite confusing.
However, it seems to work now. Thanks for the help!