mercredi 18 février 2015

Emberjs - Uncaught TypeError: Attempting to register an unknown factory: `store:main`

I'm going through the tutorial for TodoMVC on Embers website and have gotten some errors along the way. The first was:



Uncaught Error: Cannot call `compile` without the template compiler loaded. Please load `ember-template-compiler.js` prior to calling `compile`.


Which I solved by loading the mentioned script, but I then got an error:



Uncaught TypeError: Attempting to register an unknown factory: `store:main`


I've went through the Github issues for Ember and a solution was to include the following in the applications logic:



Todos.Store = DS.Store.extend();


But that caused the app to not load anymore (ironically without errors).


I'm using Ember v1.10, has anyone ran into this before with this version and can help?


I've installed via Bower:



"dependencies": {
"ember": "~1.10.0",
"ember-data": "~0.0.14"
}


And below is how my scripts are loaded:



<script src="bower_components/jquery/dist/jquery.min.js"></script>
<script src="bower_components/handlebars/handlebars.min.js"></script>
<script src="bower_components/ember/ember.debug.js"></script>
<script src="bower_components/ember/ember-template-compiler.js"></script>
<script src="bower_components/ember-data/ember-data.min.js"></script>
<script src="js/application.js"></script>


Would appreciate the help on learning a JS framework





Aucun commentaire:

Enregistrer un commentaire