-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Good Morning. I would like to use an attribute to change the value and color "status". When I use: "if="@{vm.statusSystem.status eq 'STOP'}">" I works well but it does not update the value, if it change. When I use: "if="@bind(vm.statusSystem.status eq 'STOP')">" It works fine updating the value but not the color.
<attribute name="style"
if="@bind(vm.statusSystem.status eq 'STOP')">
color: #e03534; font-weight: bold;
</attribute>
Thank you very much.
I prefer to use EL expressions directly inside the attributes. Something like this should do the trick:
<div id="content"
style="@load(vm.status eq 'STOP' ?
'color: #e03534; font-weight: bold;' : 'color:#fff;')" />
Costas
Asked: 2014-07-18 08:20:40 +0800
Seen: 9 times
Last updated: Jul 18 '14