dimanche 10 mai 2015

cannot load a custom helper

I have wrote a highlight helper follow the ember guides.

app/helpers/highlight.js export default Ember.Handlebars.makeBoundHelper( function(value, options) { var escaped = Handlebars.Utils.escapeExpression(value); return new Ember.Handlebars.SafeString('<span class="highlight">' + escaped + '</span>'); }); I invoke the helper in the application template with {{highlight name}} and declare the name in application controller . When visit the index page I got this error Assertion Failed: A helper named 'highlight' could not be found. Seems the helper is not loaded. Is there any configuration to load the helper ?




Aucun commentaire:

Enregistrer un commentaire