Closed bnetter closed 5 years ago
Same when you use this as attributes.
component-name amount=transaction.$amount
@bnetter it seems that attributes with the "$" character are incompatible with the cases you mention here. But you can work around it today with this syntax in your first case:
div #{transaction.$amount}
And in the second case:
component-name amount=(get transaction '$amount')
Or (which I think will only work for strings):
component-name amount='#{transaction.$amount}'
Thanks @kketch, first syntax works (we were aware of this one but it's a proper workaround), second one won't work unless you're running Ember 2.1.0 for the get
keyword (sadly that's not our case yet) and the last one simply transmits a #{transaction.$amount}
string. Still, except than maybe write a get
helper before going 2.1.0, we're unable to prefix our properties with $
.
@tmosmant I'll look soon for a fix, it looks like a parser bug
I'm not 100% sure, but I suspect this may be a good place to start.
I sometimes prefix my attributes with
$
, as$amount
. Then, when using it on my templates, I get the following error:Example code: