Closed rmzr7 closed 6 years ago
My understanding is that
select
each months as |month|
option selected={{isAdmin}} value=month {{month}} month
compiles to
<select>
{{#each months as |month|}}
<option>selected={{isAdmin}} value=month {{month}} month</option>
{{/each}}
</select>
It seems that Emblem cannot handle properties without quotes, so the modern onclick={{action}}
style is also not usable. The Emblem.js parser generator needs some love I think
I believe the issue is the use of double mustache. Emblem's syntax for explicit mustache is using the single syntax (e.g. { isAdmin }
).
That being said, Emblem is very smart about handling bound attributes. So for example, these have identical output:
option selected=isAdmin value=month #{month} month
option selected={ isAdmin } value={ month } #{month} month
(Note also the use of #{}
for in-string mustache).
As for actions, especially after 0.8 you can use pretty much any action / subexpression inside single mustache. For some examples, see these tests.
Doing something like
Would result in