mardi 3 mars 2015

Ember.js Handlebars missing helpers

I'm building my first Ember.js application and everything was going well until I tried to move my templates to seperate files and precompile them.


I've tried various techniques and various versions of Ember and Handlebars.


Compiled templates that contain only HTML are working fine but as soon as I try using helpers in my templates I get the following kind of error:



Error: Missing helper: 'link-to'



I've isolated the error down to a simple example. Here's the simple template:



<div>
{{#link-to "users"}} users link {{/link-to}}
</div>


I have the following script references:



<script src="../Scripts/jquery-2.1.3.min.js"></script>
<script src="../Scripts/handlebars.js"></script>
<script src="../Scripts/compiledTemplates.js"></script>
<script src="../Scripts/ember-1.10.0.min.js"></script>
<script src="../Scripts/ember-template-compiler.js"></script>
<script src="../Scripts/ember-data.min.js"></script>


Any help will be much appreciated. I cannot find any other references to this problem and it's driving me nuts.





Aucun commentaire:

Enregistrer un commentaire