Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are nested helpers (subexpressions) supported in Meteor?

I would use this: http://handlebarsjs.com/expressions.html#subexpressions

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

But meteor give me an error...there is some solution or workaround for use nested helpers?

thanks!

like image 744
elbowz Avatar asked Jan 10 '23 14:01

elbowz


1 Answers

Nested Helper: If there is a positional argument followed by other (positional or keyword arguments), the first argument is called on the others using the normal helper argument calling convention.

Passing helperB to helperA

{{helperA helperB}}

Passing 'helperB with argument x' to helperA

{{helperA helperB x}}

Passing 'helperB with argument x=false' to helperA

{{helperA helperB x=false}}

Spacebars inclusion and block arguments

https://github.com/meteor/meteor/blob/devel/packages/spacebars/README.md#inclusion-and-block-arguments

like image 75
Max Hodges Avatar answered Jan 21 '23 15:01

Max Hodges