Executing javascript inside Handlebars template

前端 未结 3 1216
长情又很酷
长情又很酷 2021-01-02 02:16

I\'m totally new to js template engines. Handlebars seems to be the popular choice. I don\'t dislike the syntax for doing conditions, loops and so on, but since I\'m perfect

3条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2021-01-02 02:44

    Sorry to resurrect a old issue here. If you have to use handlebars or it's not feasible to change your templating library you can use Helpers from the Handlebars library.

    http://handlebarsjs.com/expressions.html#helpers

提交回复
热议问题