How to use comments in Handlebar templates?

前端 未结 4 480
谎友^
谎友^ 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:34

    Just add an exclamation mark after the opening brackets.

    Normal Expression:

    {{expressions}}
    

    Commented Expression:

    {{!expressions}}
    

提交回复
热议问题