Reputation: 13
Is there any way to put {{expression params={{expression}}}}
I have code like this {{name value={{place}}}}
where name
and place are expressions
.The problem is I cannot do this in js and i wanted this to be done in handlebars So is there any way to solve this problem?
Upvotes: 0
Views: 167
Reputation: 112
You can nest subexpressions in handlebars with parenthesis. A common example is using the hash helper to pass a nested object to a component
{{name value=(hash prop1="a" prop2=(hash sub1="x" sub2="y"))}}
passes the following object to value
{
prop1: "a",
prop2: {
sub1: "x",
sub2: "y"
}
}
Upvotes: 0