If I use this code it returns wind speed. if the wind speed is 0 it returns Calm - perfect.
<div>${ob.windSpeedMPH> 0 ? `${ob.windSpeedMPH}mph` : `Calm`}</div>
But I want to add the wind direction to the output, this works for that. Returns wind direction and speed, ie. SSW@4mph - BUT if the wind is 0 it returns SSW@calm. This is what I need help with. If the wind is 0 I want it to return Calm for both the wind direction and wind speed, just one word, Calm. can you tell me how to accomplish this with the below code?
<div>${ob.windDir || 'N/A'}@${ob.windSpeedMPH> 0 ? `${ob.windSpeedMPH}mph` : `Calm`}</div>
Thanks, John
Well, just move it.
ok, we will see, next time its Calm
If there's something you don't understand, just ask.
this is what ended up working. thank you for your help.
<div>${ob.windSpeedMPH> 0 ? `${ob.windDir} @ ${ob.windSpeedMPH}mph` : `Calm`}</div>
Glad you got it working but ' ' is missing the ending semi-colon.
Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)