You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First off - thank you for creating such an incredible library! I just had some minor pieces of feedback - that might help people adopt Handlebars quicker.
On this page, under the Helpers section, on the final example.
From my understanding of the documentation (please correct me if I'm wrong), but it appears that the second parameter 'options' in the helper registration function is a wrapper for all hashed parameters passed in. This means that, for the example below (from my understanding) {{{link "See more..." href=story.url class="story"}}}
corresponds to: Handlebars.registerHelper('link', function(text, options)...
where here, _text _= "See more..." and _options _= {href:"", class:"story"}. Are these object values here correct?
Is my understanding here correct? If not, could the documentation be updated to reflect what it should be? If my understanding here is correct, could the documentation be updated to make this more clear (this isn't immediately obvious)? Also, perhaps a caveat could be added, explaining why you couldn't simply pass in an 'options' JavaScript object, rather than key-value pairs of hashes (href="google.com" vs. {href:"google.com"})?
Thank you for all of the effort put in here!
The text was updated successfully, but these errors were encountered:
First off - thank you for creating such an incredible library! I just had some minor pieces of feedback - that might help people adopt Handlebars quicker.
On this page, under the Helpers section, on the final example.
From my understanding of the documentation (please correct me if I'm wrong), but it appears that the second parameter 'options' in the helper registration function is a wrapper for all hashed parameters passed in. This means that, for the example below (from my understanding)
{{{link "See more..." href=story.url class="story"}}}
corresponds to:
Handlebars.registerHelper('link', function(text, options)...
where here, _text _= "See more..." and _options _= {href:"", class:"story"}. Are these object values here correct?
Is my understanding here correct? If not, could the documentation be updated to reflect what it should be? If my understanding here is correct, could the documentation be updated to make this more clear (this isn't immediately obvious)? Also, perhaps a caveat could be added, explaining why you couldn't simply pass in an 'options' JavaScript object, rather than key-value pairs of hashes (href="google.com" vs. {href:"google.com"})?
Thank you for all of the effort put in here!
The text was updated successfully, but these errors were encountered: