Open cossssmin opened 1 year ago
Trying to figure out how to pass an object to the loop attribute, added the test as a way of reproducing the issue.
loop
These don't work, you'll get SyntaxError: Unexpected token \':\':
SyntaxError: Unexpected token \':\'
<each loop='key, value in {foo: "bar", baz: "qux"}'> <p>{{key}}: {{value}}</p> </each>
<each loop='key, value in {"foo": "bar", "baz": "qux"}'> <p>{{key}}: {{value}}</p> </each>
Meanwhile arrays work perfectly fine:
<each loop='item, index in [1,2,3]'> <p>{{index}}: {{item}}</p> </each>
@Scrum am I doing something wrong, or are objects passed like that just not supported?
Trying to figure out how to pass an object to the
loop
attribute, added the test as a way of reproducing the issue.These don't work, you'll get
SyntaxError: Unexpected token \':\'
:Meanwhile arrays work perfectly fine:
@Scrum am I doing something wrong, or are objects passed like that just not supported?