How to use comments in Handlebar templates?

前端 未结 4 489
谎友^
谎友^ 2021-01-30 10:15

I am using Handlebar.js as my templating engine. Now I want to comment out some of the blocks in my handlebar templates. But then I realized that Handlebar doesn\'t ignore the e

4条回答
  •  面向向阳花
    2021-01-30 10:35

    The newest version of Handlebars has block comments support :

    {{!-- {{commented expressions}} --}}
    

    https://github.com/wycats/handlebars.js/commit/a927a9b0adc39660f0794b9b210c9db2f7ddecd9

提交回复
热议问题