For me, yesterday was day one of using Ember seriously (in the past i’ve built a couple very trivial hello world apps).
I’m trying to create a custom template helper. Any idea why the linked code isn’t working as I’d expect? I’m trying to send the model (which contains an array) to a helper that should join the array elements together as a string, but instead I get the literal string “model”.
Looking over the sample templates on the handlebars site, this should work. (I know that handlebars != htmlbars, but I had thought that htmlbars was able to grok a handlebars template.)
I guess I needed Ember.Handlebars.registerBoundHelper instead of Ember.Handlebars.registerHelper
Whats the purpose of Ember.Handlebars.registerHelper (I’m not certain what lead me to believe I wanted registerHelper). Looking at the API (Ember - 4.6 - Ember API Documentation) I don’t see registerHelper listed. That said there are handful of links in the API that have ‘handlebars’ and ‘htmlbars’ as part of their title and its not clear to me which one(s) I should care about.
Handlebars.registerHelper is a legit method, but it belongs to Handlebars proper. Also, there’s some utility behind registerBoundHelper inside Ember that wires up binding, where the plain registerHelper in the Handlebars library wouldn’t.