Closed dustincleveland closed 5 years ago
Moon v1 only supports dynamic attributes with the key={value}
syntax. However, I am open to changing this to support the previous syntax given enough support.
My mistake then. I must have seen that interpolation worked in text elements and assumed that it would work in attributes as well. This is a pretty common feature of most view binding engines I've encountered, so I'd definitely recommend it. But, at the very least, it may be helpful to add a note about this to your documentation on your website.
This change will require a significant amount of extra weight to the compiler, and I think that the utility it provides isn't worth it. In addition, libraries like Vue don't support it either. Closing for now but I may consider it if there is enough support for the idea.
In the example above,
{$x}
and the first instance of{$index}
will be rendered. However, none of the{$index}
bindings in the select element's attributes will be rendered. Instead, the HTML that is rendered ends up beingForm[{$index}].Value
.