wycats / handlebars-site

56 stars 66 forks source link

How to use in_array in .hbs file #203

Closed techabserve closed 4 years ago

techabserve commented 5 years ago

How to use in_array in .hbs file

"<option value="{{this._id}}" {{#ifIn this._id userServicesList }}selected{{/if}}>{{this.serviceTitle}}"

nknapp commented 4 years ago

You have to register a custom helper for that http://handlebarsjs.com/guide/#custom-helpers