handlebars access global variable: if statement

前端 未结 1 1171
被撕碎了的回忆
被撕碎了的回忆 2021-01-21 15:23

I\'ve got a hbs template where I\'ve got an array of objects and a boolean toggle variable (toggles the template behavior), let\'s say:

{
  objs: list,
  mode: t         


        
1条回答
  •  野的像风
    2021-01-21 16:08

    Finally, I've found a solution:

    {{#if ../mode}}xyz{{/if}}
    

    0 讨论(0)
提交回复
热议问题