Pergunta

I'm using a lot of the following in my templates:

{{#if isController}}

To make that line usable, I have to serialize the data and add the isController attribute to it. Instead, I'd like to use an isController Handlebars helper.

Problem: cannot pass another helper as an argument to the #if helper.

Question: Is there a way I can pass a Handlebars helper as an argument to the #if helper?

Foi útil?

Solução

Since version 1.3 you can do this:

{{outer-helper (inner-helper 'abc') 'def'}}

More info here

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top